YAML Formatter
Parse and re-serialise YAML with consistent indentation and validation.
Input
Result
How to use
How to format YAML
Paste YAML and press Format. The document is parsed and written back with standard indentation.
- Paste YAML into the input editor.
- Press Format.
- Copy the normalised document.
Frequently asked questions
Are anchors and aliases supported?
Anchors and aliases are resolved on parse, so the formatted output contains the expanded values.
Will formatting remove comments?
Comments are not preserved because the formatter works from the parsed data structure.
Related tools
YAML Validator
Validate YAML syntax and get a precise error when indentation or structure is wrong.
YAML to JSON
Convert YAML documents into JSON for APIs and JavaScript applications.
JSON to YAML
Convert JSON to clean YAML for configuration files and Kubernetes manifests.
XML Formatter
Pretty print XML with consistent indentation and optional attribute wrapping.
XML Validator
Check that an XML document is well formed and see a clear error description.
XML Minifier
Remove whitespace between XML tags to produce the smallest payload.