What formatting changes
The output is a re-serialisation, not a reprint. Anything JSON.parse does not keep is gone.
- Numbers are normalised.
1.0,1e0and1all come back as1, and-0comes back as0. - Duplicate names collapse. RFC 8259 §4 says names SHOULD be unique and leaves the rest undefined; JavaScript resolves it by last-one-wins, so
"a": 1, "a": 2formats to a single"a": 2. - Integers above 253−1 lose precision.
JSON.parseproduces IEEE-754 doubles, so9007199254740993comes back as9007199254740992. For 64-bit identifiers (snowflakes, Postgresbigintkeys) treat this tool as a viewer, not a round trip. - Whitespace and original key order are not preserved. Sorting orders keys by UTF-16 code unit, so
Zcomes beforea. Arrays are never reordered, because array order is data.
Where the error line and column come from
They are worked out from the input, not copied from the browser's error message, because the engines disagree. V8 (Chrome, Edge, Node) says at position 24 and drops the position entirely for short inputs. SpiderMonkey (Firefox) says at line 2 column 9 of the JSON data. JavaScriptCore (Safari) gives no position at all. Where an engine does report one, it is recomputed to a line and column that read the same everywhere. Where none does, the pointer falls back to the first recognisable clue in the input, so it can land somewhere else than another browser puts it.
Common problems
- Trailing comma:
{"a": 1,}. Legal in JavaScript, illegal in JSON. Use the strip button, or delete the comma. - Comments:
tsconfig.json,devcontainer.jsonand VS Code settings are JSONC, not JSON. Stripping is string-aware, so a//inside"https://example.com"survives. - Single quotes or unquoted names: that is a JavaScript object literal or JSON5. Every name and every string in JSON is double-quoted.
- NaN, Infinity, undefined: JSON has no literal for any of them (RFC 8259 §6). Use
null, or a quoted string. - A leading byte-order mark: files from PowerShell's
Out-File, older Notepad and some Java tooling start with U+FEFF, whichJSON.parserejects at position 0. Stripped here before parsing.
Frequently asked questions
Why did my long number change?
JSON numbers become JavaScript doubles, which hold 53 bits of integer precision, so anything above 9,007,199,254,740,991 is rounded. Every JSON tool built on JavaScript does this. For exact 64-bit integers, transport them as strings.
Can it format JSONC or JSON5?
JSONC yes. JSON5's single quotes, unquoted names and hex numbers are reported rather than rewritten, since rewriting means guessing what you meant.
Does it validate against a JSON Schema?
No. This checks syntax. Schema validation checks whether valid JSON matches a contract of required properties, types and formats.
Is my JSON sent anywhere?
No. Parsing and formatting both happen in this tab, and nothing is written to the address bar either. The JSON people paste into a formatter is very often an API response with a token or personal data in it.