JSON vs. YAML
YAML is a superset of JSON's data model but uses indentation instead of braces and brackets, which makes it more readable for config files — Docker Compose, GitHub Actions, Kubernetes manifests, and Ansible playbooks all use YAML. Any valid JSON document is technically also valid YAML, but this tool converts to YAML's cleaner, indentation-based style.
Using this as a YAML formatter
Paste YAML into the right panel and convert to JSON, then convert that JSON back to YAML — this round-trip re-serializes your YAML with consistent indentation, which doubles as formatting and validation, since malformed YAML will fail to parse in the first step.
Frequently asked questions
Does this support YAML anchors and aliases?
Yes — anchors (&name) and aliases (*name) are resolved during parsing, so converting to JSON expands them into their full repeated values, since JSON has no equivalent reference syntax.
Why does my YAML fail to parse?
YAML is whitespace-sensitive — inconsistent indentation (especially mixing tabs and spaces) is the most common cause. Other frequent issues are missing colons after keys, or an unquoted string that YAML misinterprets as a number, boolean, or date.
Is my data uploaded when I use this tool?
No. Conversion happens entirely in your browser using the js-yaml library, loaded once and run locally — nothing is sent to a server.