YAML Formatter

Format, validate, and beautify YAML with consistent indentation and error highlighting. Free online tool, no signup.

Preparing private browser tool…

Your file will stay on this device.

Frequently asked questions

Does this tool support YAML 1.2?
It handles common configuration YAML (scalars, mappings, block sequences, nested blocks, inline collections) and normalizes indentation. Anchors, custom tags, and multi-document files are not parsed.
Are comments preserved?
Yes. Comment lines keep their text and are re-indented with the block they belong to, and a # inside a quoted string or a URL is left alone.
What does Valid actually check?
The document is parsed before it is formatted, so an error points at the offending line instead of the tool silently reformatting something it could not read.
Is my YAML uploaded?
No. All formatting runs entirely in your browser - nothing is uploaded or stored.
Why does it reject tabs?
The YAML spec forbids tab characters for indentation. Replace tabs with spaces and try again.