How it works
Paste or type JSON in the editor above. As you type, we run the browser's native parser and report the first error with its line and column. Hit Format to pretty-print, or Minify to strip whitespace.
Why this site is fast
- Pure static HTML — no framework runtime, no analytics bloat.
- All parsing happens locally in your browser.
- No tracking, no ads, no cookies.
Guides
- Fix "Unexpected token" errors in JSON
— trailing commas, single quotes, unquoted keys, BOMs, and other
common
SyntaxErrorcauses with examples and fixes. - "Unexpected token u in JSON at position 0"
— the specific variant that means
undefinedwas passed toJSON.parse, and the five places it sneaks in. - "Unexpected token o in JSON at position 1"
— the variant that means an object got coerced to
[object Object]instead of stringified. - Bad control character in string literal
— unescaped newlines, tabs, and BOMs that break
JSON.parseand the four most common ways they sneak in. - Duplicate keys in JSON — what the spec says, what every parser actually does, and how to detect duplicates before they silently overwrite values.
- NaN and Infinity in JSON — why they're invalid, what each language does about it, and the pandas → browser pipeline that silently loses your numbers.
- Comments in JSON — why JSON excludes them, when to use JSONC or JSON5, and workarounds that survive a strict parser.
FAQ
Is my JSON sent to a server?
No. Validation runs in your browser using the built-in JSON parser.
What's the difference between formatting and minifying?
Formatting adds indentation and newlines so JSON is readable. Minifying removes all unnecessary whitespace to make it as small as possible — useful for embedding in code or reducing payload size.
Why does JSON not allow comments or trailing commas?
The JSON spec (RFC 8259) keeps the format minimal so parsers stay simple and interoperable. If you need comments, consider JSONC or JSON5 — but most APIs expect strict JSON.