JSON formatter & validator
Paste JSON on the left. Get pretty-printed output and validation on the right. Runs entirely in your browser.
What this does
It parses your JSON with the browser's native JSON.parse, then re-emits it formatted. If parsing fails, you get the exact error message with position information so you can find the bad comma or unclosed bracket.
Common JSON mistakes
- Trailing commas —
{"a":1,}is invalid JSON. (JavaScript allows it; JSON doesn't.) - Single quotes —
'key'is invalid. JSON requires"double quotes". - Unquoted keys —
{key:1}is invalid. Keys must be quoted strings. - Comments —
// like thisare not allowed in standard JSON. - NaN / Infinity / undefined — not valid JSON values.
JSON spec quick reference
JSON values can be: a string (in double quotes), a number, true, false, null, an array [...], or an object {...}. Strings escape with backslash: \", \\, \n, \t, \uXXXX.
Related: word counter · case converter · markdown editor