deftools.io Developer Tools

🗜️ Gzip Compressor

Gzip compress and decompress text online — the universal HTTP Content-Encoding format for .gz files, API payloads, and web server compression

0 chars · 0 B
0 chars · 0 B

About this tool

Gzip is the same compression your web server uses to shrink HTTP responses and your OS uses for .gz files. This tool compresses any text into gzip and shows the Base64 representation, or reverses it — decompress Base64-encoded gzip data back to readable text.

It is useful when inspecting gzipped API payloads, decoding Content-Encoding: gzip response bodies, shrinking large JSON before pasting into a config, or checking how well repetitive text compresses.

Example: compressing 4,000 characters of repeated Latin text yields roughly 120 bytes — the tool shows the ratio (e.g. ratio −97.0%) so you can see the savings at a glance. Paste Base64 that starts with H4sI and auto-detect will decompress it automatically.

FAQ

Why is the output Base64 and not the raw .gz file?

Gzip output is binary and cannot be displayed or copied safely as text. Base64 makes it pasteable; many tools and APIs exchange gzipped payloads this way. The actual compressed byte size (used for the ratio) is shown next to the output.

My compressed output is larger than the input — is that broken?

No. Gzip has per-stream overhead (~18 bytes header/trailer), so very short or already-compressed input (random data, base64, JPEGs) can come out larger than the original. Compression helps most with repetitive, human-readable text.

Can I decompress a .gz file I downloaded?

Yes. Open the file, but you must provide it as Base64. The easiest path is to Base64-encode the file first, paste the result, and click Decompress. Direct binary file input is not supported because gzip streams contain raw bytes.

Does this work for deflate or brotli too?

This tool only handles the gzip format. Browsers also support deflate and brotli through the same CompressionStream API, but gzip is the most common interchange format and the one with the recognizable H4sI Base64 signature.

More developer tools

Copied!