Code · Made a little simpler

JSON Compressor GZIP

Compress a UTF-8 JSON document with its original bytes or remove insignificant whitespace first. Preview the payload and verify the extracted JSON without rewriting number or string tokens.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Compress validated UTF-8 JSON. Optional minification removes whitespace outside JSON tokens before GZIP encoding.

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

JSON Compressor GZIP: how to use it

  1. Paste JSON or open a local UTF-8 file. Leave minification off to keep original bytes.
  2. Select Compress to GZIP. Compare source, payload and archive sizes and save the .json.gz file.
  3. Choose Use output to extract, or open a local .json.gz in Extract mode, to check the restored document.

Limits and notes

Uses one GZIP member, up to 9 MB compressed and 8 MB of UTF-8 payload. A small archive can be larger than its source. Validates one JSON value with up to 128 levels and 500,000 tokens. Minification also removes a tolerated leading UTF-8 BOM.

How your privacy works →

JSON Compressor GZIP: common questions

Will minification round an integer or change an escape sequence?

It copies JSON tokens exactly, including number spelling, key order and escapes. It removes inter-token whitespace and a leading BOM.

Does GZIP make the JSON invalid?

The archive contains binary GZIP data. Extract it and read the resulting UTF-8 document as JSON.

Why is this archive larger than my original JSON?

GZIP adds a header and trailer. That overhead can outweigh compression gains on a small document.

Guides