142+ Free Online Tools · Easy. Fast. Accurate.

YAML Formatter

Normalize YAML with consistent indentation, instantly in your browser.

How to use the YAML Formatter

  1. Paste your YAML.
  2. Choose the indent size in spaces, usually 2.
  3. Click Run and copy the formatted YAML.

How the YAML Formatter works

The formatter parses your YAML into data (mappings, sequences and scalar values) and writes it back out with consistent indentation, so mixed or uneven spacing is normalized. Simple inline flow-style lists and objects such as [a, b] are supported too.

YAML depends on indentation, so a mis-indented line can change the meaning; errors are reported rather than guessed at. Anchors, aliases and multiple documents in one file aren't supported, and comments aren't preserved.

Frequently asked questions

Is this tool free?
Yes. Format YAML at no cost, with no account required.
What YAML features are supported?
Standard block-style mappings, sequences, and scalars, plus simple flow-style lists and objects. Anchors, aliases, and multi-document files are not supported.
Are tabs allowed in YAML?
No. YAML indentation must use spaces. Tabs are not permitted for indentation.
Does my text leave my browser?
No. The conversion runs entirely in your browser, so your text is never sent to a server.

More Text Tools

Browse all Text Tools →