📦 GZIP Compressor & Decompressor
Compress or decompress data using GZIP. Runs entirely in your browser.
Last updated: November 8, 2026 · By the BoltQuickTools team
Gzip or unpack data without a command line
You may need to see how much a text payload shrinks under gzip, or read a Base64 gzip blob found in a log, an API response or a config value. This page does both using the browser's built-in CompressionStream and DecompressionStream, and the tool's code sends nothing over the network.
Compressing and decompressing
- Choose the Compress or Decompress tab. Switching tabs clears the page.
- Choose Text or File. In Decompress mode, Text expects Base64 and File expects real gzip bytes.
- Press the Compress or Decompress button. Results appear in Output, with Original Size, the result size, Ratio and Savings below.
- Copy Output copies the text shown. Download saves the raw bytes.
Real results on small inputs
| Input (Text mode) | Original | Compressed | Ratio | Savings |
|---|---|---|---|---|
hello | 5 B | 25 B | 500.0% | -400.0% |
hello repeated 10 times with spaces | 59 B | 29 B | 49.2% | 50.8% |
| 1000 letter a | 1000 B | 29 B | 2.9% | 97.1% |
Compressing hello printed:
H4sIAAAAAAAACstIzcnJBwCGphA2BQAAAA==
The first row shows why very short strings get bigger: gzip adds a header and trailer of 18 bytes whatever the input size. The header also records an operating system code, so a few characters near the start of that Base64 can differ between platforms. The decompressed result is the same. To check it in a terminal, run echo 'H4sI...' | base64 -d | gunzip.
What it accepts and what it will not do
- Only the gzip format. A
.zip, raw deflate or zlib stream fails with an error in the status line. - A
.tar.gzdecompresses to the.taras a single file. It does not list or extract what is inside. - Text-mode Base64 must be standard. URL-safe Base64 using
-and_is rejected withError: Invalid base64 input. - There is no compression level setting, because the browser API does not offer one.
- Output that is not valid UTF-8 appears as
[Binary data - size]followed by Base64. Use Download rather than copying it. - Files are held entirely in memory and there is no size cap, so very large files depend on your device. Compressed output is also placed in the text box as Base64, which makes a big file slow to handle.
- Download names follow the input:
photo.png.gzfor a file,output.gzfor text, anddecompressed.txtwhen you decompress Base64 text. - Older browsers without these APIs get a notice at the top, and the buttons will not work there.
Answers to likely questions
Why does the Original Size look wrong after decompressing?
In Decompress mode, that card shows the size of the gzip data you supplied, and the Decompressed Size card shows what came out.
Can I paste the compressed output straight into an HTTP body?
Not as Base64 text, unless the receiver decodes it. For Content-Encoding: gzip send the raw bytes from Download. The API tester is useful for trying such requests.
What can I do with a pasted Base64 string that is not gzip?
Decode it with the Base64 tool and inspect the first bytes in the hex editor. Gzip data begins with the bytes 1F 8B.