All calculators·JSON formatter

JSON formatter

Pretty-print, validate and minify JSON in the browser

Nothing leaves the page

Parsing happens in your browser with the built-in JSON parser. Nothing is uploaded, which matters when the payload you are debugging has real customer data in it.

Where the error message points

When JSON is invalid the parser reports the character position it gave up at. That is usually just after the real mistake — a trailing comma or an unquoted key on the line above.

Ad

While you’re here — claim a crypto exchange bonus

More calculators

Frequently asked questions

Q. Are trailing commas allowed?

No. JSON forbids them, even though JavaScript object literals allow them. This is the single most common reason a hand-edited file fails to parse.

Q. Can keys use single quotes?

No. JSON requires double quotes on both keys and string values. Single quotes are valid JavaScript but not valid JSON.

Q. Is key order preserved?

Yes, the order you pasted is kept. JSON itself does not guarantee object key order, but parsers in practice preserve it.