JSON Formatter — Pretty-print, validate and minify JSON in your browser
Paste JSON to format it with 2- or 4-space indentation or minify it, with syntax errors reported by position. For debugging API responses, reading config files and cleaning up log output. Nothing leaves your browser.
Paste an API response or config file to make it readable and check it for errors.
Loading...
JSON Formatter: tips and things to know
- JSON requires double quotes around keys and strings; single quotes are invalid.
- A trailing comma after the last item is an error in JSON.
- Nesting depth is limited only by the parser; hundreds of levels are fine.
How to use the JSON Formatter
Paste your JSON
Paste the text into the input box.
See it formatted
The formatted result appears instantly; errors are shown in red with the position.
Copy or minify
Copy the result, or press Minify to compress it.
JSON Formatter FAQ
Is my JSON sent to a server?
No. Everything is processed in your browser.
Can it handle large files?
Anything that fits in browser memory. Files of a few megabytes format without trouble.
What does Minify do?
It removes indentation and line breaks to make the JSON as small as possible, for example for an API request body.