Guaranteed semantic equivalence
Minification works by parsing and re-serialising, so whitespace inside string values is never touched — only the insignificant whitespace between tokens is removed.
Strip whitespace from JSON to make it as small as possible.
Loading tool…
The tool is loading its code on your device. This happens once and is cached for later visits.
Processed entirely on your device
Overview
Minify JSON online — remove indentation, line breaks and unnecessary whitespace without changing a single value. Shows the exact byte saving.
Minification is the JSON equivalent of compilation: same semantics, fewer bytes, worse for humans. It matters in three situations — a payload embedded in a length-limited field, a document stored at scale where whitespace adds up, and any JSON crossing a network boundary.
JSON's grammar allows insignificant whitespace in exactly four places: before and after any of the structural characters { } [ ] : ,. That is the entire surface a minifier touches. Everything else — every character between the quotes of a string — is data and must survive byte-for-byte.
This tool parses the document and re-serialises it rather than running a whitespace-stripping regular expression. That distinction is important: a regex approach will corrupt a document containing "message": "a, b\n c", because the spaces and escaped newline inside that string are indistinguishable from formatting whitespace to a pattern that does not understand string boundaries.
If your JSON travels over HTTP with gzip or Brotli enabled — and it almost certainly does — minification saves far less than the raw byte count suggests. Whitespace is extremely compressible: repeated indentation is exactly the kind of redundancy those algorithms excel at. In practice, minified-plus-gzipped and pretty-plus-gzipped are often within a few percent of each other.
Minification still matters when:
Because minification goes through the JavaScript parser, the same big-integer caveat as the formatter applies: numeric literals above 2^53 − 1 will lose precision. If your document contains snowflake IDs or other very large integers, verify the output against the input before relying on it, or handle those fields as strings at the source.
Step by step
Paste the pretty-printed JSON you want to compact.
Press Minify; the parser validates first, so broken input is reported rather than mangled.
Compare the input and output byte counts to see the saving.
Copy the minified string, or download it as a compact .json file.
Why use it
What this tool is good for, and what it deliberately does not try to do.
Minification works by parsing and re-serialising, so whitespace inside string values is never touched — only the insignificant whitespace between tokens is removed.
Invalid JSON produces a positioned error instead of a silently broken payload, which is the failure mode that causes production incidents.
Reports bytes before and after, so you can judge whether the compaction is worth it for a given payload.
Configuration fields, URL query parameters, environment variables and embedded-device payloads all have hard length limits that pretty-printed JSON blows through.
Questions
Short, honest answers about quality, limits and privacy.