YAML to JSON Converter
Convert YAML to JSON instantly: maps become objects, sequences become arrays, with clear errors for invalid YAML. Multiple documents become a JSON array.
Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.
How to use the YAML to JSON Converter
- 1 Paste your YAML.
- 2 Choose the JSON indentation.
- 3 Copy the JSON or download it as a file.
About the YAML to JSON Converter
YAML is pleasant to write by hand, JSON is what most programs and APIs exchange. The converter parses your YAML and outputs the equivalent JSON: mappings become objects, sequences become arrays and scalars become strings, numbers, booleans or null.
Anchors and aliases (&default and *default), as well as merge keys (<<: *default), are resolved, so the JSON contains the complete data. When the input contains several documents separated by ---, you get a JSON array with one item per document.
Values follow the YAML 1.2 core schema: true and false are booleans, numbers without quotes are numbers, null and ~ are null, and dates are converted to ISO date-time strings. Quote a value in YAML if you want it to stay a string, such as a version number like "1.10" or a postal code with a leading zero.
Frequently asked questions
Why did 1.10 become 1.1?
Without quotes YAML reads 1.10 as a number. Write "1.10" in the YAML to keep it as text.
What happens to comments?
JSON has no comments, so YAML comments are dropped.
Can I convert JSON back to YAML?
Yes, with the JSON to YAML converter. Since JSON is a subset of YAML 1.2, any JSON is also valid YAML.
How are dates converted?
YAML timestamps such as 2026-11-30 or 2026-11-30T09:30:00Z become ISO 8601 strings in JSON, since JSON has no date type.