JSON formatter
Beautify messy JSON or minify it to one line. Pick the indentation, sort keys if you like, and copy or download the result. It all runs in your browser.
Loading…
How it works
- 1
Paste or open your JSON
Paste it on the left, or open a .json file. Files are read on your machine and never uploaded.
- 2
Choose the style
2 or 4 spaces, tabs, or minified to a single line. Turn on Sort keys to order every object A–Z.
- 3
Copy or download
The formatted JSON updates as you type. Syntax errors are shown with their exact line and column.
Questions
- Does formatting change my data?
- Values, types and array order stay the same, and numbers are kept exactly as written: 1.0 stays 1.0 and long IDs are never rounded. Two exceptions, both flagged with a warning: if a key appears twice in one object, only the last value is kept, and number-like keys such as "1" move to the front of their object, a rule every browser applies.
- Is there a size limit?
- No fixed limit. Files of tens of megabytes work; the only limit is your browser’s memory.
- Is my JSON sent anywhere?
- No. Formatting happens in this tab, and the page is blocked from sending your data to any server.