How to use the JSON Formatter
- Paste your JSON into the box.
- Click “Format” to beautify it, or “Minify” to compress it.
- If the JSON is invalid, the error and its line and column are shown.
Common JSON errors
- Trailing commas –
{"a": 1,}is not valid JSON. - Single quotes – strings and keys must use double quotes.
- Unquoted keys –
{a: 1}must be{"a": 1}. - Comments – JSON does not allow
//or/* */comments.
Private by design
API responses and config files often contain keys or personal data. This formatter runs entirely in your browser, so nothing you paste is sent to a server.
Frequently asked questions
What does “sort keys” do?
It orders the keys of every object alphabetically, which makes two JSON documents easier to compare.
Is there a size limit?
No fixed limit. Several megabytes of JSON format quickly on most devices.