JSON Formatter & Validator

Paste in messy or minified JSON to beautify it, validate it, or minify it — with exact line/column error locations when it's broken. Runs entirely in your browser; nothing is uploaded anywhere.

Your JSON

Frequently asked questions

Why does my JSON say invalid when it looks fine?

The most common causes are a trailing comma before a closing } or ], single quotes instead of double quotes around strings, unquoted object keys, or comments (JSON has no comment syntax, unlike JavaScript). This tool flags each of these specifically when it detects them, in addition to reporting the exact line and column where parsing failed.

Is my data uploaded anywhere?

No. Formatting, validating, and minifying all happen locally in your browser using JavaScript's built-in JSON parser — nothing you paste in is sent to a server.

What's the difference between formatting and minifying?

Formatting (beautifying) adds indentation and line breaks so nested JSON is easy for a human to read. Minifying strips all unnecessary whitespace to produce the smallest possible valid JSON string, which is what you'd actually want to send over a network or store, since JSON parsers don't care about formatting.

Why would I sort keys alphabetically?

Sorting keys makes it easy to diff two JSON objects that should be equivalent but were generated in different orders (JSON object key order isn't semantically meaningful), or just makes a large object easier to scan when you're looking for a specific field.