Format YAML

Reformat a YAML document with clean, consistent indentation, useful for tidying up a configuration file before committing it.

Example:

How it works

The tool parses your YAML to check that it is syntactically valid, then rewrites it with standard 2-space indentation. This is useful after manually editing a configuration file (Docker Compose, GitHub Actions, Kubernetes) to make sure the structure is consistent before sharing or committing it.

Does formatting change the order of keys?

No, the order of keys at the same level is preserved exactly as it appears in the original document. Only the formatting (indentation, spacing) is normalized.

What happens if my YAML contains a syntax error?

The tool displays a precise error message indicating the nature of the problem encountered during parsing, allowing you to quickly fix the offending line.

100% local processing: formatting runs entirely in your browser via WebAssembly — your file is never sent to a server.