JSON LAB / BROWSER TOOLS
JSON Formatter
Make one document easier to read. Format, minify or sort object keys while keeping your original input.
0 / 1,000,000 UTF-8 bytes. Maximum nesting: 100 levels.
Copy and Download become available after a successful run.
Processing runs locally and keeps the original input. Sorting changes object key order and keeps array order. Duplicate keys and numbers that cannot be preserved safely are rejected; put long IDs in quotes. Invalid JSON is reported without automatic repair.
What you can do
- Format with 2 or 4 spaces, or minify to compact JSON.
- Sort keys recursively without changing array order.
- Copy or download the current result.
- Process up to 1 MB and 100 nesting levels locally.
Questions, answered
Will formatting change my values?
The tool validates input first and rejects unsafe numbers, duplicate keys and negative zero instead of silently changing them. Formatting changes whitespace and normalizes equivalent numeric notation.
Does sorting reorder arrays?
No. Sorting applies to object keys at every level. Array elements keep their original positions.
Why is my long numeric ID rejected?
JavaScript cannot represent all long integers precisely. Quote identifiers as strings, or use a lossless JSON tool if the value must remain numeric.