TOOLTIKI Lovable tool, really free
Developer Config

Docker Compose formatter

What to do

Processed in your browser · nothing is uploaded

Local · YAML rules, which is why ports need quotes
Advertisement
320 × 100

Reindents a `docker-compose.yml` to two spaces per level and reports the line where it fails to parse — which for Compose is almost always an indentation problem.

How to use the docker compose formatter

1 Paste your input. The result appears immediately.
2 Pick the operation you want.
3 Copy the result, or save it as a file.

Compose files are YAML, so indentation is not style, it is structure. A service nested one level too deep becomes a key of the service above it, and the error Compose reports is about an unexpected field rather than about indentation — which sends people looking in the wrong place entirely. Quoting ports is the other recurring problem, and it is the YAML sexagesimal rule. An unquoted `22:22` is parsed as a base-60 time value, not as a port mapping, so it becomes the number 1342. Any port mapping should be quoted, which is why the Compose documentation quotes them even in examples where it does not strictly matter. Environment values have a similar trap: `DEBUG: true` is the boolean true, while a container expects the string `"true"`. Compose converts it, but a value like `VERSION: 1.10` becomes 1.1, and `ENABLED: no` becomes false. Quote anything that is meant to reach the container as text.

Questions

Almost always indentation — a service nested one level too deep becomes a key of the service above it.

Compose file referenceYAML 1.1 — sexagesimal integers
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING