YAML to JSON Converter
Paste YAML, get clean JSON. Runs entirely in your browser with the js-yaml parser. Handles anchors, multi-document files, and gives real error line numbers.
Private by construction. The conversion happens in this page's JavaScript. Nothing you paste here leaves your machine, and the tool keeps working with the network unplugged.
This converter uses the same js-yaml parser that Node.js projects use, so what validates here validates in your toolchain. It supports YAML 1.2, anchors and aliases, and multi-document streams (documents separated by --- come back as a JSON array). Parse errors report the offending line instead of failing silently.
Questions this tool gets asked
Is my YAML uploaded to a server?
No. The parser runs as JavaScript inside your browser tab. You can disconnect from the internet after the page loads and the tool still works.
How are YAML anchors and aliases handled?
Anchors (&) and aliases (*) are resolved during parsing, so the JSON output contains the expanded values, which is the standard behavior when converting YAML to JSON.
Can I convert a file with multiple YAML documents?
Yes. Documents separated by --- are parsed individually and returned as a JSON array, one element per document.
Why did my YAML fail to parse?
The most common causes are tabs used for indentation (YAML requires spaces) and unquoted strings containing special characters like colons. The error message reports the line number to check.