YAML Formatter
Normalize and re-indent YAML, or convert it to JSON, with a configurable indent width.
How it works
- 1
Paste your YAML into the input area — the tool accepts any valid YAML document.
- 2
Choose the output format (normalized YAML or JSON) and the indent width, then press Format YAML.
- 3
Copy the result or download the file. All processing happens on your device.
Questions
What does normalizing YAML mean?
The input is parsed into a data structure and re-emitted with consistent indentation, quoting, and key ordering — removing inconsistencies without changing any values.
Can it convert YAML to JSON?
Yes. Select JSON as the output format and the tool emits a standard JSON document with the same data.
What if my YAML has a syntax error?
The tool reports a plain-English message with the line where the problem was found, so you can fix it quickly.
Is my data sent to a server?
No. Parsing and formatting happen entirely in your browser — nothing leaves your device.
More developer tools
JSON Formatter
Paste compact or messy JSON and get it back neatly indented with your chosen spacing.
JSON Minifier
Remove all whitespace and line breaks from a JSON document to shrink it as small as possible.
JSON Validator
Check whether a JSON string is well-formed, and see the exact line and column of any syntax error.
JSON Beautifier
Reformat JSON with sorted keys and readable indentation for easier reading and diffing.
JSON Tree Viewer
Explore a JSON document as an interactive collapsible tree — expand and collapse any node.
XML Formatter
Pretty-print XML with configurable indentation, preserving attributes, comments, and tag order.
XML Validator
Check XML for well-formedness and report every error with its line and column number.
Markdown Preview
Render Markdown as formatted HTML with GFM tables and task lists, updating live as you write.