← Back to tool

Compress · Strip whitespace · Ship

Minify JSON

Updated: June 2026

Minifying JSON removes every byte that machines do not need: the spaces, tabs and newlines that make it readable to people. The result is the smallest valid representation of the same data, which is exactly what you want when you ship it over a network or store it at scale.

Minify My JSON →

Free · No upload · Instant in the browser

What minifying actually removes

JSON allows insignificant whitespace between tokens. A formatted document is full of it — indentation before each key, a space after every colon, a newline after every value. None of that changes the meaning, so a minifier deletes all of it. The keys, the values, the quotes and the structural punctuation all stay; only the optional spacing disappears.

The savings are real. A pretty-printed configuration file can shrink by 30–50% once its indentation is gone. Multiply that across millions of API responses or log lines and the bandwidth and storage difference becomes significant.

When you should minify

  • Embedding JSON in a URL query parameter or a data attribute where every character counts.
  • Sending payloads from a browser or mobile client on a slow or metered connection.
  • Storing many small JSON records where per-row overhead adds up.
  • Pasting a config into a single-line environment variable or secret manager field.
  • Producing a compact fixture or snapshot for a test that does not need to be read by hand.

Minify versus gzip

A common question is whether minifying matters when the server already compresses responses with gzip or Brotli. The two work at different layers. Compression shrinks the bytes on the wire but the payload is decompressed back to its original size in memory; minifying reduces that in-memory size too, which helps parsing speed and storage. In practice the gains stack: minified JSON compresses to slightly fewer bytes than pretty JSON, and it parses marginally faster because the tokenizer has less whitespace to skip. For anything stored uncompressed — a database column, a localStorage entry, a URL — minifying is the only lever you have.

Reversible by design

Minifying is lossless. Because only insignificant whitespace is removed, you can always re-format a minified document back into a readable shape without losing a single value. That makes it safe to minify aggressively for storage or transport and then beautify on demand whenever a human needs to inspect the data. The tool does both: switch to the Beautify tab and the same JSON expands again with whatever indentation you choose.

And as with every Flowfiles tool, the work is local. Your JSON is parsed and re-serialised in your own browser, so even secrets and customer data can be minified without ever leaving your machine.

Frequently asked questions

How do I minify JSON?

Paste your JSON and select the Minify tab. The tool removes all whitespace and outputs the data on a single line, ready to copy or download.

Does minifying lose any data?

No. Only insignificant whitespace is removed. Every key and value is preserved, and you can beautify the result back to a readable form at any time.

How much smaller will my JSON get?

It depends on how much indentation it had. Deeply nested, pretty-printed files often shrink by 30–50%; already-compact data shrinks less.

Is minifying done on a server?

No. The minifier runs in your browser with JavaScript, so nothing is uploaded and it works offline.