JSON Formatter & Validator
Parsed by your browser's own JSON engine. Tokens and records in your payload never leave the machine.
Format, minify and validate JSON. Errors report the exact line and column, and the tree view lets you collapse large structures to find what you need.
What JSON does not allow
JSON is a strict subset of JavaScript object syntax, and the differences catch everyone. These are all invalid:
| Invalid | Valid | Why |
|---|---|---|
{name: "Ada"} | {"name": "Ada"} | Keys must be quoted |
{'a': 1} | {"a": 1} | Double quotes only |
[1, 2, 3,] | [1, 2, 3] | No trailing comma |
{"a": 1} // note | {"a": 1} | No comments |
{"a": undefined} | {"a": null} | undefined is not a JSON value |
{"a": .5} | {"a": 0.5} | Leading digit required |
The precision limit
JSON itself puts no bound on number size, but JavaScript parses every number into a 64-bit float. Beyond 2⁵³ − 1 — that is 9,007,199,254,740,991 — integers start rounding silently. A 64-bit database ID pasted here will come back subtly wrong, and no formatter can prevent that.
The correct fix is on the API side: send large identifiers as strings. If you are debugging a mismatch between an ID in your database and one in a JSON payload, this is the first thing to check.
Frequently asked questions
Why does my JSON fail to parse?
Almost always one of four things: a trailing comma after the last item, single quotes instead of double quotes, unquoted keys, or a comment. All four are legal in JavaScript and illegal in JSON. The error message here reports the exact line and column, which narrows it down immediately.
Is my data sent anywhere?
No. Parsing and formatting use the browser's own JSON engine, running locally. That matters more than it sounds for this particular tool — people routinely paste API responses containing tokens, customer records and internal identifiers into online formatters.
What is the difference between formatting and minifying?
They produce identical data. Formatting adds indentation and line breaks so a human can read the structure; minifying strips every optional space so the payload is as small as possible. Minify for transport and storage, format for reading and diffing.
Why did my large numbers change?
JavaScript numbers are 64-bit floats, so any integer above 9,007,199,254,740,991 loses precision — a common problem with 64-bit database IDs and Twitter-style snowflake identifiers. If your IDs are that large, the API should be sending them as strings. This is a limitation of JSON in JavaScript, not of this tool.
Related tools
- Password GeneratorGenerate strong random passwords using your browser's cryptographic RNG, with a live strength estimate.
- Hash GeneratorCompute SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or files using the Web Crypto API.
- UUID GeneratorGenerate cryptographically random version 4 UUIDs in bulk, in several output formats.