Skip to content
Free developer tool

JSON minifier

This JSON minifier strips the spaces, tabs and line breaks that make JSON readable but add bytes. Developers use it to shrink payloads, config values and test fixtures and to see how much space formatting costs.

  • Runs in your browser
  • Free, no account needed
  • Copy or download the result

Your input

94 characters

Output

Result

Size saved21.3%
Minified size
74 bytes
Original size
94 bytes
Bytes removed
20
{"name":"Ada Lovelace","languages":["en","fr"],"active":true,"score":98.5}

The short answer

Minifying JSON removes every space, tab and line break outside strings, so the data stays identical but the file gets smaller. Smaller payloads save bandwidth and storage. The size saved depends on how much indentation the original had.

FormulaSize saved % = (original bytes - minified bytes) / original bytes x 100

Worked exampleThe sample record shrinks from 94 bytes to 74 bytes, which removes 20 bytes and saves 21.3%, giving {"name":"Ada Lovelace","languages":["en","fr"],"active":true,"score":98.5}.

Example

Input
{
  "name": "Ada Lovelace",
  "languages": [ "en", "fr" ],
  "active": true,
  "score": 98.5
}
Result
Size saved21.3%
Minified size
74 bytes
Original size
94 bytes
Bytes removed
20
{"name":"Ada Lovelace","languages":["en","fr"],"active":true,"score":98.5}

How to use the json minifier

  1. Paste your JSON into the JSON box.
  2. Choose the Output: With size report, or JSON only.
  3. Read the size saved at the top, with the minified JSON below it.
  4. Choose JSON only before you use Copy result or Download if you want just the JSON.

How it works

The JSON is fully validated first, and any error gives the line and column.

Only whitespace outside strings is removed. Text inside strings, the spelling of numbers and the order of keys stay exactly as written, so large numbers are not rounded.

The size report comes first: percent saved (rounded to one decimal place), then minified and original sizes in UTF-8 bytes, the way files and HTTP bodies are measured.

Minifying is not compression like gzip. Web servers usually apply gzip or Brotli on top of it.

Everything runs in your browser. Your input is not uploaded or stored. If you use Copy link, what you entered is placed in the link.

Questions and answers

Does minifying JSON change the data?

No. Only spaces, tabs and line breaks between values are removed, so any JSON parser reads the same data.

How is the saving calculated?

It is the original size minus the minified size, both in UTF-8 bytes, divided by the original size.

How do I make minified JSON readable again?

Paste it into the JSON formatter, which adds the indentation back.

Can it minify JSON with comments?

No. Comments are not part of JSON, so they are reported as an error. Remove them first.

Last updated November 1, 2026. Maintained by SnowRock. How our tools work

All 220 SnowRock tools