JSON formatter and validator

Pretty-print messy JSON, minify it for production, or just check whether it is valid.

Updated October 2026 · Free · No login · Runs in your browser

What the formatter does

Format indents the JSON with two spaces so nested objects and arrays are readable. Minify removes all whitespace for the smallest payload. Validate parses the text and reports the first error with its position, which is usually a trailing comma, a single quote or a missing bracket.

Privacy for API keys and payloads

Everything runs in your browser, so pasting API responses that contain tokens or customer data is safe. Nothing is logged or sent anywhere.

Frequently asked questions

Why does my JSON fail with a trailing comma?

JSON does not allow a comma after the last item in an object or array, unlike JavaScript.

Does it support JSON5 or comments?

No, strict JSON only.