YAML to JSON Converter
Paste YAML to get formatted JSON instantly. Handles lists, nested maps, anchors and aliases. Your data stays in your browser.
How to convert YAML to JSON
- Paste or type your YAML into the editor.
- Pick the JSON indentation you want, 2 or 4 spaces.
- Copy the JSON or download it as a .json file.
Examples
Mapping with a list
name: Ada age: 36 skills: - math - logic
{
"name": "Ada",
"age": 36,
"skills": [
"math",
"logic"
]
}Frequently asked questions
Is my YAML uploaded anywhere?
No. The conversion runs entirely in your browser, so your YAML never leaves your device.
What is the difference between YAML and JSON?
Both describe the same kind of data. YAML uses indentation and is easy for people to read and write, while JSON uses braces and brackets and is the format most APIs and code expect.
Why would I convert YAML to JSON?
Config files are often written in YAML, but tools, APIs and JavaScript usually need JSON. Converting lets you reuse the same data where JSON is required.
What happens to comments and anchors?
JSON has no comments, so YAML comments are dropped. Anchors and aliases are resolved into the real values, so the JSON contains the fully expanded data.
Does it support nested maps and lists?
Yes. Nested mappings and sequences convert to nested JSON objects and arrays, with scalars mapped to the matching JSON types.
Can I paste JSON instead of YAML?
Yes. JSON is valid YAML, so pasting JSON works too and gives you a re-formatted, pretty-printed result.
Learn more
- YAML vs JSON: when to use each
How YAML and JSON differ, where each one fits, and what changes when you convert between them.
Related tools
JSON to YAML
Convert JSON to YAML online. Paste JSON and get clean, readable YAML with proper 2-space indentation. Fast, free and runs in your browser.
JSON Formatter
Format, validate and minify JSON online. Pretty-print with custom indentation, sort keys and catch syntax errors. Runs in your browser.
Binary to Decimal
Convert binary to decimal online. Paste any binary number, with or without spaces, and get the exact base-10 value instantly. Runs in your browser.
Binary to Hex
Convert binary to hexadecimal online. Paste a binary number and get exact hex, with optional uppercase. Handles huge values. Runs in your browser.
Celsius to Fahrenheit
Convert Celsius to Fahrenheit instantly. Type a temperature in C and get F, with the formula and a quick reference table. Runs in your browser.
Centimeters to Inches
Convert centimeters to inches instantly. Type a length in cm and get inches, with the formula and a quick reference table. Runs in your browser.