JSON Formatter & Validator
Format, minify and validate JSON, or convert it to YAML or CSV. Errors report the exact line and column, and the four commonest causes are named rather than guessed at.
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. Paste
9007199254740993 and it comes back as
9007199254740992: a 64-bit database ID pasted here will be
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. This tool reports the exact line and column and names which of the four it found, so you do not have to read the engine's wording.
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
- Diagram & Flowchart MakerDraw flowcharts and diagrams, connect the boxes with arrows that route themselves, and let it arrange the whole thing. Exports SVG. Nothing is uploaded.
- Password GeneratorGenerate strong random passwords using your browser's cryptographic RNG, with a live strength estimate.
- HTML Entity EncoderEncode text for HTML or decode entities back — the five markup breakers, named Latin-1 and symbol sets, numeric references up to emoji. Decodes exactly once.