Docker Compose Validator

Catch broken indentation, unknown keys and bad port syntax before deploy.

compose.yml
Findings

Paste a Compose file to see structural problems, unknown keys and risky settings.

Send output to

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 enviroment or volums is 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:8080 unquoted is fine, but - 22:22 is parsed by YAML as a sexagesimal number, and any mapping in MM:SS range 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_on pointing at a service that does not exist.
  • Risky settings. privileged: true, mounting the Docker socket, network_mode: host, and the latest tag — 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.

Questions people actually ask

Does this replace `docker compose config`?
No. It catches the structural mistakes — bad indentation, misspelled keys, malformed port and volume strings — without needing a daemon. Compose itself remains the authority on semantics like build context resolution.
Which Compose version is assumed?
The Compose Specification, which is what modern `docker compose` reads. The legacy top-level `version` key is accepted but flagged as obsolete.
Is my compose file uploaded?
No. Parsing and validation happen in the page. This matters because compose files routinely carry environment values and registry hosts you would not want in someone's logs.
navigate open esc close