Home › All Tools › JSON Formatter
JSON Formatter
Paste JSON to tidy it up, check that it is valid, or shrink it into one line.
Your data stays in your browser. Do not paste secrets into any website you do not trust.
How to use the JSON Formatter
- Paste your JSON into the box.
- Click Format and validate to pretty-print it, or Minify to compress it.
- If something is wrong, the message explains the problem. Fix it and try again.
Example: {"a":1,"b":[2,3]} becomes a neatly indented block after formatting.
About this tool
The tool uses your browser's built-in JSON parser, so what counts as valid matches what JavaScript accepts. Formatting uses two-space indentation. Nothing is uploaded.
Very large whole numbers can lose precision when parsed (a limit of JavaScript numbers), so check IDs longer than 15 digits.
Frequently asked questions
Why is my JSON invalid?
Common causes are trailing commas, single quotes instead of double quotes, and unquoted keys.
Does it support comments?
No. Standard JSON does not allow comments.
Is my data sent anywhere?
No, but avoid pasting secrets into any website you do not trust.