Docker Compose Validator

Paste a docker-compose.yml file and get line-referenced YAML syntax errors plus structural checks like a missing services key.

docker-compose.yml

Paste a docker-compose.yml on the left, then click Validate

Loaded

Summary

Paste a docker-compose.yml file and get line-referenced YAML syntax errors plus structural checks like a missing services key.

How it works

  1. Paste your docker-compose.yml into the input textarea, or load one of the sample files.
  2. Click "Validate" to parse the file entirely in your browser.
  3. YAML syntax errors are reported with the exact line and column where parsing failed.
  4. If the YAML is valid, the tool checks the structure: a top-level services key, at least one service, and each service having an image or build.
  5. Errors and warnings are listed separately, and a summary of detected services is shown.

Use cases

  • Catch a bad indentation or a stray tab before running docker compose up and hitting a cryptic parser error.
  • Confirm a docker-compose.yml someone pasted in a chat or PR actually defines a services key.
  • Spot a service block that forgot both image and build before it fails at container creation.
  • Sanity-check a generated or templated compose file before committing it.
  • Quickly inspect the list of services and which ports/environment keys a file declares.

Frequently Asked Questions

Last updated: 2026-07-23 · Reviewed by Nham Vu