Everything runs on your machine — your file is processed right here in your browser and never uploaded to any server.
InputJSON
Loading...
OutputJSON
Loading...

About this tool

This tool compresses JSON down to a single line by removing every space, newline, and indent that the format treats as insignificant. Paste pretty-printed JSON into the left editor and the compact version streams into the right editor as you type — no button, no waiting.

Like its formatter sibling, the minifier accepts relaxed JSON5 input, so single quotes, trailing commas, and comments are all tolerated and cleaned up into strict JSON on the way out. Minified JSON is what you want when the destination is size- or format-sensitive: shrinking a request or response payload, fitting a JSON value into an environment variable or command-line argument, embedding configuration into a single log line, or storing a compact blob in a database column.

How to use

  1. Paste or type your JSON in the left editor, or pull in a file with Load File.
  2. The minified single-line output appears on the right instantly and tracks every edit you make.
  3. Click Copy to grab the compact JSON for your payload, config, or script.
  4. Use Download to save the result as a file, or Clear to wipe both editors.

Minification happens on your device, full stop. The JSON you paste — whether it is production API data or private configuration — is processed by script running in your own browser session, is never posted anywhere, and disappears when the tab closes.

Frequently asked questions

How much smaller does minified JSON get?

It depends entirely on how much whitespace the original contained. Deeply nested, four-space-indented documents often shrink by a third or more, while already-compact JSON barely changes. Gzip compression on a web server narrows the gap in transit, so minification matters most where compression is unavailable.

Is minified JSON still valid JSON?

Yes. The JSON specification treats whitespace between tokens as insignificant, so removing it changes nothing about the data, and every parser reads the minified and pretty versions identically. Whitespace inside your string values is always preserved.

Does minifying alter my data in any way?

The keys, values, and their order all pass through untouched. The only removals besides whitespace are JSON5 extras such as comments, which have to be dropped because strict JSON has no comment syntax.