JSON Formatter
Prettify and minify JSON with indentation control
About JSON Formatter
JSON Formatter lets you prettify and minify json with indentation control.
Category: Encoding.
Frequently asked questions
What's the difference between format and minify?
▾
Formatting adds indentation and newlines for human readability. Minifying removes all whitespace to reduce file size — useful for production bundles or API responses.
Can I use this to validate JSON?
▾
The formatter will fail on invalid JSON and show an error. For detailed error messages with line numbers, use the dedicated JSON Validator tool.
What indentation size should I use?
▾
2 spaces is the most common convention (Node.js, ESLint default). 4 spaces is standard in Python. Tabs are also valid and better for accessibility tools.
Why is JSON strict about quotes?
▾
JSON requires double quotes for all strings and keys, unlike JavaScript object literals which accept single quotes. This strictness makes JSON reliably parseable across all languages.