YAML to JSON Converter
Free online yaml to json converter for developers. Convert YAML files to JSON. Fast and private.
Embed this tool
Copy and paste the code below into your website to embed this tool for free. An attribution link to The Util Box is required.
<iframe src="https://www.theutilbox.org/embed/yaml-to-json" width="600" height="500" frameborder="0" style="border: none; max-width: 100%;" title="Free YAML to JSON Converter tool from The Util Box"></iframe> <!-- Free tool by The Util Box — https://www.theutilbox.org/tools/yaml-to-json --> <a href="https://www.theutilbox.org/tools/yaml-to-json">YAML to JSON Converter by The Util Box</a>
Frequently Asked Questions about YAML to JSON Converter
YAML to JSON Converter — Configuration Into Data
This YAML to JSON converter parses a YAML document and outputs the equivalent JSON, pretty-printed so it is readable straight away. It is the quickest way to see what a configuration file actually contains.
YAML is a superset of JSON, so the conversion is lossless in principle — the differences are in the parsing, not the target.
How Values Are Resolved
Scalars are typed as they are read:
- null and ~ become null.
- true and false become booleans.
- Anything numeric becomes a number, so
42and3.14come out unquoted. - Quoted strings are unwrapped, with escaped quotes resolved.
- Everything else stays a string, including dates such as
2024-01-01.
Note that this is stricter than YAML 1.1 in one respect: yes,
no, on and off stay
strings here, although many YAML parsers treat them as booleans.
Honest Limits
- The parser covers a subset of YAML. Anchors and aliases, multi-document files, block scalars, tags and complex keys are not implemented.
- Comments are skipped, which is correct for the data but means a comment cannot be carried through into the JSON.
- Duplicate keys are silently overwritten rather than reported as an error.
- Deeply nested structures are handled, but the parser is indentation-based rather than a full YAML implementation, so unusual layouts may not parse the way a strict parser would read them.
Related Developer Tools
- YAML Formatter — normalise the file before converting it.
- YAML Lint — check the file parses at all.
- YAML Minifier — strip it back down afterwards.
- YAML Path Query — read one value out of the result.
- JSON Formatter — reformat the output.
- JSON Path Tester — query it the same way.
- JSON to YAML — the reverse conversion.
- JSON Schema Validator — check the result against a schema.
The conversion runs entirely in your browser — your YAML is never uploaded.