PureDevTools

Docker Compose Validator

Validate docker-compose.yml for syntax errors, unknown keys, and misconfigurations — entirely in your browser

All processing happens in your browser. No data is sent to any server.

Paste your docker-compose.yml content above to validate its structure, check for common issues, and view a service summary. All processing happens locally in your browser.

A single indentation mistake in your docker-compose.yml can prevent all your services from starting. Typos in directive names like depend_on instead of depends_on silently pass YAML parsing but fail at runtime. This tool validates your compose file structure and flags errors with line numbers before you run docker compose up.

What Gets Validated

The validator checks your compose file at multiple levels:

Common Mistakes This Tool Catches

These are the most frequent docker-compose.yml errors that waste developer time:

MistakeWhat Happens
depend_on instead of depends_onSilently ignored — services start in random order
port: "8080:80" instead of ports:Invalid key error at runtime
environment: KEY=VALUE (string)Should be a list (- KEY=VALUE) or map
restart: on_failureInvalid — must be on-failure (with hyphen)
Indenting with tabsYAML requires spaces, tabs cause parse errors
Missing image or buildService has no source to create a container

Why Validate Before Deploying

Docker Compose gives cryptic error messages for many configuration issues. A missing colon on line 47 might produce an error pointing to line 2. Validating your file in this tool gives you precise, human-readable error messages with line numbers, so you fix problems before they waste deployment time.

How to Use

  1. Paste your docker-compose.yml content into the editor
  2. The validator parses and checks it in real time
  3. Errors and warnings appear with line numbers and descriptions
  4. Fix the issues and re-validate until the file passes

Frequently Asked Questions

Which docker-compose versions are supported? The validator supports version “2.x” and “3.x” compose file formats, including the latest Compose Specification (no version field required).

Does it validate Dockerfile references? No. It checks that build directives have valid syntax, but it doesn’t fetch or parse the referenced Dockerfiles.

Can it validate Docker Compose override files? Yes. Paste the content of your docker-compose.override.yml and it will be validated with the same rules. Note that override files are typically merged with the base file — standalone validation won’t catch merge conflicts.

What about Docker Compose V2 vs V1 syntax? Both are supported. Docker Compose V2 (the docker compose plugin) uses the same YAML format as V1 (docker-compose). The validator handles both the legacy versioned format (version: "3.8") and the newer Compose Specification format where the version field is optional.

Can it check for security issues like running containers as root? The validator focuses on syntax and structure correctness. For security auditing (privileged mode, root users, host networking), use dedicated container security scanning tools.

Is my compose file sent to a server? No. All validation runs in your browser. Your configuration never leaves your device.

Related Tools

More Docker & DevOps Tools