How to use it
- Paste or open a file
An API response, a config file, a log line. Files are read on your device.
- Choose the output
Pretty (2 spaces, 4 spaces or tabs), minified, or a collapsible tree.
- Fix and copy
If it is invalid, jump to the error, or try "Fix common mistakes". Then copy or download.
The errors people actually make
JSON is stricter than the JavaScript it came from. Most "invalid JSON" comes down to a handful of mistakes, and the validator names each one with its line and column:
- Trailing comma:
[1, 2,]or{"a": 1,}. Allowed in JavaScript, forbidden in JSON. - Single quotes: strings and keys must use double quotes,
"like this". - Unquoted keys:
{name: "x"}is a JavaScript object, not JSON. - Comments:
//and/* */are not part of JSON, although some config formats (JSONC, JSON5) accept them. - Python values:
True,FalseandNonemust betrue,falseandnull.
"Fix common mistakes" repairs all five in one click and then validates again, so anything it cannot fix is still pointed out exactly.
Big numbers stay exact
JavaScript numbers lose precision above 9,007,199,254,740,991. Tools built on JSON.parse silently turn an id like 12345678901234567890 into 12345678901234567000. This formatter reads numbers as text and writes them back unchanged, and warns you when a value is too big for JavaScript so you know your own code may need BigInt or strings.
When to minify
Minified JSON removes every space and line break. It is smaller to send and store, and it fits on one line in logs, environment variables and curl commands. Keep the pretty version in your repository: diffs are readable and merge conflicts are easier.
Working with tokens? Decode JWT payloads in our JWT decoder. Converting a timestamp you found in the JSON? Use the timestamp converter.