Format, validate, and minify JSON instantly in your browser.
Validates JSON and pretty-prints it with proper indentation, or minifies it down to a single line. If the JSON is invalid, it shows the error message from your browser's JSON parser so you can find and fix the problem.
The tool runs in your browser and uses JavaScript's built-in JSON support, so nothing you paste is uploaded. Because it parses the JSON and writes it out again, the output is not a character-for-character copy of your input; the FAQ below lists exactly what can change.
Strict JSON is a stricter format than a JavaScript object literal. These are the usual culprits:
{name: "x"} must be {"name": "x"}.// nor /* … */ is allowed anywhere in JSON.undefined, NaN, and Infinity aren't valid; a leading zero or a hanging decimal point breaks a number.Format makes JSON readable for debugging; Minify shrinks it for storage or transport, where every byte over the wire counts. The syntax rules above come from the JSON standards listed under Sources.
Syntax rules come from the JSON standards. The key-ordering and number behaviour described above comes from JavaScript's built-in JSON methods.
Last reviewed: October 2026