Docker Compose Validator
Catch broken indentation, unknown keys and bad port syntax before deploy.
Paste a Compose file to see structural problems, unknown keys and risky settings.
Catching Compose mistakes before the daemon does
A Compose file fails in two distinct ways. The first is structural — bad indentation, a misspelled key, a port mapping written as a number when it needed quotes. These are cheap to catch and produce confusing errors when they are not. The second is semantic: the build context does not exist, the image tag is not in the registry, the named volume is not declared. Only Docker itself can tell you about those.
This validator handles the first category, and it does it without a daemon, without a Docker install, and without sending your file anywhere.
What it checks
- YAML structure. Tabs used for indentation (illegal in YAML and invisible in most editors), inconsistent nesting, and duplicate keys — where the last one silently wins.
-
Unknown service keys. A typo like
enviromentorvolumsis not an error to the YAML parser; it is simply a key Compose ignores, and your container starts without the settings you thought you gave it. -
Port syntax. The classic bug:
ports: - 8080:8080unquoted is fine, but- 22:22is parsed by YAML as a sexagesimal number, and any mapping inMM:SSrange can surprise you. Ports are checked for range and form. -
Undeclared references. A named volume or network used by
a service but never declared at the top level, and a
depends_onpointing at a service that does not exist. -
Risky settings.
privileged: true, mounting the Docker socket,network_mode: host, and thelatesttag — each flagged as a warning rather than an error, because each is occasionally the right answer.
The obsolete version key
A top-level version: was required by the old
docker-compose v1 and is ignored by the Compose Specification
that modern docker compose implements. It is harmless but
meaningless, and recent versions print a warning about it. If you still
have one, you can delete it.
Nothing is uploaded
Compose files carry registry hostnames, environment values, internal
service names and — more often than anyone admits — a database password in
an environment block. The parser and every check run in this
tab.