Example input
{"name":"Ada","active":true,"roles":["admin","editor"]}
DataHub
Tools
JSON Formatter
Local-first
Format, minify, and inspect JSON locally in your browser with a clean online JSON formatter.
This formatter calls the browser's JSON.parse, then serializes the parsed value with either two-space indentation or no extra whitespace. It validates strict JSON syntax but does not preserve duplicate keys, original number spelling, comments, or formatting.
{"name":"Ada","active":true,"roles":["admin","editor"]}{
"name": "Ada",
"active": true,
"roles": [
"admin",
"editor"
]
}Duplicate keys keep only the last parsed value. Integers beyond JavaScript's safe range may be rounded silently.
RFC 8259 defines JSON syntax. ECMAScript defines the JSON.parse and JSON.stringify behavior used by this page, including JavaScript number limitations.
Sources checked July 24, 2026. Specifications and platform behavior can change; verify the sources before formal use.
No. Input must be strict JSON.
JSON.parse keeps the last value for a repeated object key.
Not reliably. Values beyond Number.MAX_SAFE_INTEGER may be rounded.
No. It validates syntax only, not required fields, types, or business rules.