YAML Formatter — Format YAML Online
Reformat one YAML document using two-space indentation. Readable output uses JSON-compatible YAML values and preserves quoted string types.
Processed in your browser. One document at a time. Comments and anchor names are not preserved; values use the JSON-compatible YAML schema.
Make the most of this tool
Paste one YAML document, then convert and download the formatted .yaml file.
Comments and original anchor names are not preserved. This tool reformats values rather than preserving the original source text.
Multi-document streams and custom tags are not supported. Quoted strings such as "true" remain strings.
Frequently Asked Questions
Does this keep YAML comments?
No. It parses the values and writes them with consistent indentation. Comments and original anchor names are not preserved.
Can I format multiple YAML documents?
Format one document at a time. Multi-document input is rejected. The formatter uses the JSON-compatible YAML schema, so date-looking text stays text.