YAML to JSON Converter
Convert YAML to JSON and JSON back to YAML using a real YAML parser.
How to Convert YAML and JSON
- Choose a direction with the pills.
- Paste your YAML or JSON into the input box.
- The converted result appears instantly below.
Frequently Asked Questions
What parser does this tool actually use?
It uses js-yaml, a widely used open-source YAML library, rather than a simplified hand-written parser — YAML has a lot of edge cases (anchors, multi-line strings, flow syntax), so a real, battle-tested parser is what makes the conversion actually reliable.
Why did my conversion fail with a specific line and column number?
That's the real parser error message, pointing to exactly where the YAML or JSON syntax is invalid — usually inconsistent indentation (YAML is indentation-sensitive) or a missing comma or quote (for JSON).
Does converting JSON to YAML preserve comments?
No — JSON doesn't support comments at all, so there's nothing to preserve when converting in that direction. If you're converting YAML that has comments into JSON, those comments are also dropped, since JSON has no place to put them.
Is the data I paste in sent anywhere?
No — the entire conversion happens locally in your browser using JavaScript, so nothing you paste in is ever sent to a server.