SYSTEM TIME --:--:-- IST · 166 TOOLS LIVE · RUNS IN YOUR BROWSER — NOTHING UPLOADED
← Back to DEVELOPER
DEVELOPER

JSON Minifier

Strip all whitespace from JSON to make it as compact as possible.

About this tool

A JSON formatter takes minified or messy JSON and lays it out with consistent indentation so it is readable, and flags the exact point where the syntax breaks if it does not parse. This runs entirely in your browser using the native JSON parser, so nothing you paste here is sent anywhere.

It is most useful when you are debugging an API response, reading a config file that was saved without whitespace, or checking that a payload you are about to send is actually valid before it fails somewhere downstream. Minify does the reverse: it strips whitespace to shrink the payload for a request body.

If your input fails to parse, the error message shows the position JSON.parse stopped at, which is usually a missing comma, an unescaped quote inside a string, or a trailing comma that JSON does not allow (unlike JavaScript object literals).

Worked example: {"a":1,"b":2,} — with a trailing comma after the last value — fails with "Expected double-quoted property name... at position 13," pointing to the character right after that comma, where the parser expected either another key or the closing brace but found neither. This is a genuinely common mistake specifically because it's valid in JavaScript object literals (which do allow a trailing comma) but not in JSON itself, so code copied from a JS file into a JSON config often breaks in exactly this way.

Frequently asked questions

Is my data uploaded anywhere?

No. Parsing and formatting happen in your browser using JavaScript’s built-in JSON parser. Nothing is sent to a server.

Why does it say my JSON is invalid when it looks fine?

Common causes are trailing commas, single quotes instead of double quotes, or unescaped quotes inside a string — all valid in JavaScript object literals but not in strict JSON.

Is there a size limit?

No hard limit is enforced, but very large payloads (multiple MB) may slow down your browser tab since parsing happens on the main thread.

Other JSON Formatter & Validator scenarios

Related tools