About JSON Tool
API responses arrive minified because whitespace costs bandwidth. That is right for a machine and useless for a human trying to work out why a field is missing. Formatting restores the indentation that makes structure visible, and the tree view goes further — collapse the branches you do not care about and the shape of a large document becomes obvious in seconds.
When parsing fails you get the line, the column, an excerpt with the offending character marked, and an explanation in terms of what you probably meant. "Trailing comma before }" is actionable; "Unexpected token" is not.
The conversions cover the formats data actually moves between. CSV for spreadsheets and imports, YAML for configuration, XML for older APIs and feeds. CSV parsing follows RFC 4180 properly, so quoted fields containing commas and newlines survive — the thing naive split-on-comma implementations get wrong, and the reason exported spreadsheets so often import badly.
How to use the JSON tool
Paste your data
JSON, CSV, YAML or XML — whichever you are starting from.
Pick an operation
Format, minify, validate, or convert to another format.
Adjust the options
Choose indentation, sort keys alphabetically, or set the CSV delimiter.
Copy or download
Take the result to your clipboard or save it with the right file extension.
Things that commonly break JSON
- A trailing comma after the last item — valid in JavaScript, invalid in JSON.
- Single quotes around strings or keys; JSON requires double quotes.
- Unquoted object keys, which are legal in a JavaScript object literal but not in JSON.
- Comments — the specification has no comment syntax, however often people want one.
- Smart quotes substituted by a word processor, or a byte order mark from a copied file.
- NaN, Infinity or undefined, none of which are valid JSON values.
Notes on the conversions
JSON to CSV needs an array at the top level, because each element becomes a row. Columns are the union of every row's keys in first-seen order, so a row with an extra field does not lose it. Nested objects are written as JSON inside the cell, since CSV has no way to express nesting.
CSV to JSON converts values that are unambiguously numbers or booleans, but leaves anything with a leading zero as text — postcodes and phone numbers stop being themselves the moment they become integers.
XML needs exactly one root element, so an array or a bare value is wrapped before it is serialised. Attributes are prefixed with @ when converting in either direction.