JSON Formatter
Format or minify JSON while preserving numbers, strings, key order, and duplicate keys.
Files are processed in your browser and are not uploaded.
Leaving this page or changing language clears your work. Download your result before leaving.
How to use
- Paste valid JSON into the input.
- Choose two spaces, four spaces, or minify.
- Select Process, then copy or download the result.
Limits and support
Up to 1 MiB of UTF-8 text and 100 nested objects or arrays. Only whitespace outside strings changes. Comments, trailing commas, and non-JSON values are rejected.
Questions
Are large numbers and duplicate keys preserved?
Yes. Original tokens are kept, including large integers, exponents, negative zero, escaped strings, and repeated object keys.
Where is my text stored?
Your text stays in this page. It is not saved to browser storage or sent to a server. Leaving the page clears the current work.