How to format JSON
Paste JSON or open a local file, select two or four spaces, and choose Format JSON. Use Minify for compact transport and optionally sort object keys for deterministic fixtures and reviews.
Formatting, errors, and large integers
Syntax errors identify a line and column when the browser provides a position. Formatting and minification preserve integer tokens outside JavaScript’s safe range; key sorting is blocked for those documents to prevent silent rounding.
Frequently asked questions
Does formatting change my data?
No. Formatting changes whitespace and indentation, not JSON values.
Can I minify JSON?
Yes. The Minify action removes unnecessary whitespace.
Are large integers preserved?
Yes when formatting or minifying. Key sorting is disabled for unsafe JavaScript integers to prevent silent rounding.
Can I open a JSON file?
Yes. Select or drop a .json file up to 5 MB; processing remains in the browser.