Skip to content
Accessibility
Theme
Text size
High contrast
Limit animations
Readable fontAtkinson Hyperlegible
Increased text spacing
Underline links
Always show focus

Runs in your browser — nothing you paste is uploaded.

JSON Formatter & Validator

Beautify, minify, and validate JSON — with a clear message when something's wrong. Runs entirely in your browser.

Output updates as you type. 2-space indentation.


      

Beautify & minify

Beautify pretty-prints with 2-space indentation so nested objects and arrays are readable and diffable. Minify strips every optional space and newline to produce the smallest payload, which is what you want for an API response, a config embedded in HTML, or anything you are about to gzip. Both modes run the input through a real parser first — the output is a re-serialised version of the parsed value, not a text search-and-replace, so you can trust that what comes out is equivalent to what went in.

Validation

If the JSON is malformed you get the browser's native parser error, and where it supplies one, the character position — so you can jump straight to the offending token. The most common causes are a trailing comma after the last element, single quotes instead of double, unquoted object keys, or a stray comment: none of these are legal JSON, even though JavaScript and JSON5 allow some of them. For example, {"a":1,} fails on the trailing comma, and {'a':1} fails because keys and strings must use double quotes.

Things to watch

JSON numbers are IEEE-754 doubles, so a very large integer or a high-precision decimal can round when parsed and re-emitted — keep those as strings if exactness matters. Key order is preserved as written, and duplicate keys collapse to the last value, matching standard parser behaviour. The tool handles objects, arrays, strings, numbers, booleans and null; it does not evaluate JavaScript expressions.

Related

Converting between formats? See YAML ⇄ JSON and CSV ⇄ JSON. To infer a shape from a sample, try JSON to Types, or tidy a query with the SQL Formatter.

Privacy

Parsing happens locally; nothing you paste is uploaded.

Frequently asked questions

Is my JSON uploaded anywhere?

No — parsing, formatting and validation all happen in your browser.

What counts as valid JSON here?

Strict JSON: double-quoted keys and strings, no trailing commas, no comments. Invalid input shows the parser's message and, where the browser provides it, the position.

Related tools