JSON Formatter & Validator
Beautify, minify, and validate JSON - runs entirely in your browser.
Stays in your browser · Always freeThis free JSON formatter and validator lets you beautify minified JSON, minify large JSON for production, and validate JSON syntax to catch errors before they reach your app. Everything runs in the browser - nothing leaves your machine.
Common uses:
- Beautify a minified API response to inspect its structure
- Validate JSON configuration files before deploying
- Minify JSON to reduce payload size in API responses
JSON is the lingua franca of modern APIs and config files - but it arrives, more often than not, as one long unindented line that's impossible to scan. This tool beautifies, minifies, or validates JSON entirely in your browser. Paste in a payload, click Beautify, and read it like a normal nested structure. If the JSON is invalid, the validator points at the exact location of the syntax error.
What "format JSON" actually means
JSON is a strict text format, but the spec is silent on whitespace inside the document - {"a":1,"b":2} and the same object spread across 5 indented lines are identical to a parser. The reason "format" matters is purely human readability.
Beautify re-emits the JSON with consistent indentation (2 spaces, line breaks after each comma at depth) so a long nested object becomes scannable.
Minify does the opposite - strips every byte of optional whitespace so the JSON is as small as possible. Useful for production payloads where bandwidth matters or for embedding JSON inside other formats.
Validate just runs the JSON through a strict parser and reports either "valid" or the location of the first parse error. Useful when an API call is failing for unknown reasons or when you've hand-edited a config file.
Common JSON gotchas
Trailing commas are not allowed. [1, 2, 3,] and {"a": 1,} are valid in JavaScript and most modern languages, but JSON requires no trailing comma. This is the single most common parse error.
Strings must use double quotes. {'name': 'value'} is invalid JSON - single quotes won't parse. Same applies to keys.
Keys must be quoted. {name: "value"} is JavaScript object literal syntax, not JSON. The key needs double quotes too.
No comments. Strict JSON has no comment syntax. // and /* */ will both fail. JSON5 and JSONC support comments but most tooling doesn't accept them by default.
Numbers can't have leading zeros (other than 0 itself), and NaN and Infinity are not valid JSON values.
Encoding matters. JSON is officially UTF-8. If you're getting weird characters when parsing, check the encoding of the source file - Windows tools sometimes save as UTF-16 with a BOM.
How do I format JSON?
What does the JSON validator check?
Can I minify JSON?
What is the difference between beautify and minify?
Why does my JSON show a parse error?
{ or [ (BOM bytes, JSONP padding). The error message indicates roughly where the parser gave up.Does this support JSON5 or JSONC (JSON with Comments)?
Does this tool send my JSON anywhere?
JSON.parse and JSON.stringify. Open DevTools → Network and confirm: nothing is transmitted. Safe for inspecting responses that contain real customer data.What's the maximum size of JSON I can paste?
jq - the browser becomes sluggish well before it crashes.