Format or minify JSON
Format or minify JSON locally while preserving large integers and exact numeric spellings.
Loading workspace…
How it works
Uses a token-preserving parser so large integers beyond 53 bits and decimal spellings stay unchanged. Formatting runs locally in your browser without executing or transmitting your JSON.
Example · Formatting {"txId":9007199254740993,"amount":1.00} with 2 spaces keeps 9007199254740993 and 1.00 intact.
How to use this tool
- Paste or type your JSON document into the input area and choose 2 spaces, 4 spaces, tabs, or minified output.
- Select Format JSON to parse and re-serialize the document locally while preserving large integers and decimal spellings.
- Use Copy JSON or Download JSON to save the formatted result. Review any duplicate-key warning shown beside the status message.
Common questions
Why does this formatter avoid standard JSON.parse for numbers?
JavaScript numbers are 64-bit floats, which silently round integers above 9,007,199,254,740,991 and strip trailing zeroes like 1.00. A token-preserving parser keeps exact numeric text intact.
Does formatting accept trailing commas or comments?
No. Standard RFC 8259 JSON forbids comments and trailing commas. When syntax is invalid, the formatter points to the exact line and column that failed.
Is my JSON uploaded or saved?
No. Parsing and formatting run entirely inside your browser memory without storing inputs or sending them over the network.