Tools › JSON Formatter & Validator
{ }
JSON Formatter, Validator & Minifier
Paste JSON to validate it, pretty-print it with your choice of indentation, or minify it. Your data never leaves the browser.
How it works
The formatter uses the browser's strict JSON parser, so the result is exactly what a standards-compliant parser accepts. Common mistakes that cause errors: trailing commas, single quotes instead of double quotes, unquoted keys, and comments (not allowed in JSON).
Frequently asked questions
Why does my JSON say unexpected token?
Usually a trailing comma, single quotes, an unquoted key, or a comment. The error message includes the position of the problem.
Is my JSON uploaded anywhere?
No. Parsing and formatting happen locally in your browser.
What is the difference between format and minify?
Format adds line breaks and indentation for readability; minify removes all unnecessary whitespace to save bytes.