DevTool Desk

JSON Formatter/Validator

Input
Output

Paste any JSON to instantly format, validate, beautify (pretty print), or minify it. Invalid JSON is flagged with the exact line and column of the problem, so you don't have to hunt for a missing comma or bracket by hand. Switch to the tree view to explore deeply nested objects and arrays like a JSON viewer, or turn on 'Sort keys' to get a deterministic, diff-friendly ordering. Everything happens locally in your browser.

Frequently asked questions

Why does my JSON show as invalid even though it looks correct?

Common causes are trailing commas, single quotes instead of double quotes, unquoted keys, or comments — none of which are valid in standard JSON. The error message shows the exact line and column where parsing failed.

What does 'Sort keys' do?

It recursively reorders every object's keys alphabetically before formatting. This is useful for producing consistent, diffable output when comparing JSON from different sources.

Does minifying lose any data?

No — minify only removes whitespace and line breaks between tokens. The resulting JSON is functionally identical to the beautified version, just smaller.

Is my JSON data sent to a server?

No. Parsing and formatting happen entirely in your browser using JavaScript's built-in JSON parser — nothing is uploaded.

How do I format or pretty print JSON?

Paste your JSON and choose Beautify. It's re-indented with consistent spacing so nested objects and arrays are easy to read. Minify does the opposite and collapses it onto one line.

How do I validate JSON?

Paste it in and the tool parses it right away. If it's valid you'll see the formatted result, and if not you'll get the exact line and column of the error.

Can I view JSON as a tree?

Yes. Switch to the tree view to use it as a JSON viewer: expand and collapse nested objects and arrays to explore large documents.