JSON Formatter & Validator
Paste JSON to pretty-print or minify it. Invalid input is reported with the exact character position.
What this tool checks
Parsing JSON with JSON.parse() gives you a strict validation: keys must be double-quoted, trailing commas are not allowed, and comments are invalid. When parsing fails the browser tells us the character offset, which we translate into a line and column so you can jump straight to the mistake.
Common JSON errors
- Trailing comma —
{"a":1,}is invalid, remove the last comma. - Single quotes — JSON requires double quotes around keys and strings.
- Unescaped characters — a literal newline inside a string must be written as
\n. - Comments —
//and/* */are not part of JSON, even though they work in JavaScript objects. - NaN / Infinity — not valid JSON values; use
nullor a string.
Pretty print vs minify
Formatting adds whitespace so humans can read the structure; minifying strips it to shrink payload size. For production APIs, minified JSON can cut transfer size noticeably on large responses, especially before compression.
Is my data private?
Yes. Parsing happens in your browser tab and nothing is uploaded. You can safely paste API responses containing tokens or customer data.