JSON Converter
Convert JSON to other formats and back. The tool below converts between JSON and YAML; the links under it cover CSV and Excel.
What you can convert
The converter above turns JSON into YAML and YAML back into JSON. For tables, use CSV ↔ JSON. For spreadsheets, our sister site converts JSON to Excel and Excel to JSON, and JSON to CSV.
Before you convert
Make sure the JSON is valid. If you are not sure, run it through the JSON formatter first, or edit it in the JSON editor. YAML is indentation-sensitive, so check the result before using it in a config file.
How to use it
- Paste your JSON (or YAML) into the converter.
- Choose the direction and convert.
- Copy the result.
Common use cases
- Turning an API response into a YAML config.
- Converting Kubernetes or CI configuration between formats.
- Preparing data for spreadsheets with the CSV and Excel converters.
What the YAML output looks like
The converter writes YAML in a fixed, predictable style so that the result is easy to diff. Take this JSON object and run it through the JSON-to-YAML direction:
{"name":"api","port":8080,"debug":false,"version":"1.10","tags":["a","b"],"env":{"LOG_LEVEL":"info","EMPTY":null},"limits":[]}
The output uses two-space indentation and lists with a leading dash. Every string value is wrapped in double quotes, numbers and booleans are not, null is written as null, and an empty array stays as []. Because strings are always quoted, "1.10" survives as a string instead of turning into the number 1.1, which is a classic problem with hand-written version fields.
name: "api" port: 8080 debug: false version: "1.10" tags: - "a" - "b" env: LOG_LEVEL: "info" EMPTY: null limits: []
Going the other way
Pasting YAML on the right produces pretty-printed JSON with two-space indentation. The parser handles the structures most config files use: nested mappings, dash lists, quoted and unquoted scalars, null and ~, and inline [a, b] or {x: 1} collections. Comments are ignored. Be aware that unquoted values such as yes are kept as the string “yes” rather than turned into a boolean, and 1.10 becomes the number 1.1, so quote anything that has to stay exact.
Some advanced YAML features are not supported yet: block scalars written with | or > and anchors with aliases (&base and *base) produce an error rather than a wrong answer. If your file uses them, expand them by hand first.
Picking the right converter
This page is for structured, nested data. If your JSON is a flat array of similar objects and the goal is a spreadsheet, use the CSV converter linked above instead: CSV has no way to represent nesting, so deep objects would have to be flattened. If you only want to tidy the text without changing format, the JSON formatter is the better fit. And if you need to know what changed between two versions of a document after converting, run both through JSON Compare.
Frequently asked questions
How do I convert JSON to YAML?
Paste the JSON into the converter above and convert it to YAML, then copy the output.
Can I convert JSON to Excel here?
Not in this tool. Use JSON to Excel on SmartFileConverters, linked above, which creates an .xlsx file in your browser.
Is my JSON uploaded?
No. The conversion above runs in your browser.
Why is every string in the YAML output quoted?
Quoting is the safe default. It stops values like 1.10, 2026-01-01 or true from being read as numbers, dates or booleans when the YAML is loaded later. You can remove the quotes yourself where you are sure it is harmless.
Can this convert JSON to XML or TOML?
No. This tool converts between JSON and YAML only. CSV, and Excel through the linked sister site, are handled by the other converters on this page.