Format JSON
Validate JSON syntax and format it with two-space indentation. Review numeric precision and duplicate keys before replacing your source.
Your input and results stay in this browser.
Readable JSON, not a schema check
The formatter parses the input as JSON and serializes the resulting value with two-space indentation. It catches invalid syntax such as trailing commas, unquoted property names and comments. A successful parse does not prove that a configuration matches your application schema or that an API will accept it. Check required fields, types and values against the destination specification separately.
Important round-trip limits
Parsing uses JavaScript numbers, so integers beyond the safe integer range can lose precision. Duplicate object keys collapse to the last value. Original whitespace and number spelling are not preserved. Keep the original, especially when processing exported identifiers or signed data. Input is limited to two million characters; processing stays in the browser and does not send the pasted JSON to a formatting service.
Workflow and result checks
- Paste valid JSON, without comments or trailing commas.
- Run the formatter and inspect nested objects, keys and numbers.
- Copy or download the result while retaining the original source.
Questions about this tool
Does it support JSON5 or comments?
No. The parser accepts standard JSON syntax, not JSON5, comments or JavaScript object literals.
Can I format very large numeric IDs safely?
Numbers beyond 9007199254740991 may lose integer precision. Represent identifiers as strings in the source when the format permits it.