The JSON formatter turns compact or messy JSON into indented, readable text. Unlike many formatters built on JSON.parse, it keeps the original text of every number and string: an ID such as 12345678901234567890 is not rounded and escapes like \u00e9 stay exactly as written.
It also flags duplicate keys, because every parser decides differently which one to keep, and numbers that JavaScript cannot represent exactly.
How to use it
- Paste your JSON or open a local .json file.
- Pick the indentation: 2 spaces, 4 spaces or tab.
- Press Run (or Ctrl + Enter). Syntax errors show the line and column.
- Copy or download the result.
Example
{"id":12345678901234567890,"name":"Ana Pérez","active":true,"tags":["admin","beta"],"profile":{"city":"Sevilla","score":4.75,"manager":null}} {
"id": 12345678901234567890,
"name": "Ana Pérez",
"active": true,
"tags": [
"admin",
"beta"
],
"profile": {
"city": "Sevilla",
"score": 4.75,
"manager": null
}
}
Limitations
- Strict JSON only (RFC 8259): no comments, trailing commas or single quotes. Remove JSON5/JSONC extensions first.
- Limit of 5 MiB on desktop, 2 MiB on mobile, and 100 nesting levels.
- The formatter never reorders keys or removes duplicates: it only warns about them.
FAQ
- Is my JSON sent to a server?
- No. Parsing happens in a worker inside your browser and the content is neither stored nor added to the URL.
- Why does my long number stay unchanged, unlike other tools?
- Because the output reuses the exact text of each number. A JavaScript double is only exact up to 2^53 − 1; the tool warns you when a number exceeds that range so you can treat it as a string or BigInt in your code.
- What happens with repeated keys?
- The JSON is formatted anyway, keeping both, and a warning shows the key path. RFC 8259 says names should be unique and duplicate handling is unpredictable across parsers.