About this JSON tool
Paste any JSON to format it with consistent indentation, minify it for transport, or sort object keys alphabetically so that diffs between two documents are easier to read. Parsing uses your browser's built-in JSON.parse, so the data never leaves your device.
Common JSON errors
- Trailing commas:
[1, 2, 3,]is valid JavaScript but invalid JSON. - Single quotes: strings and keys must use double quotes.
- Unquoted keys:
{name: "x"}must be{"name": "x"}. - Comments: JSON has no comment syntax; strip
//and/* */. - Special numbers:
NaN,Infinityand leading zeros like012aren't allowed.
Format or minify?
Formatted JSON is for humans: config files, logs, code review. Minified JSON removes whitespace for network payloads and storage, though for HTTP responses gzip or brotli compression usually matters more than minification.