Toolvore

GZIP Compress / Decompress

Compress a file to GZIP or decompress a supported .gz file, then download the exact output bytes.

This tool runs entirely in your browser. Your data is never uploaded, never stored, and never leaves your device.

Compress arbitrary file bytes to GZIP or decompress a .gz stream locally, with bounded output and downloadable results.

How to use it

  1. 1Select Compress to GZIP or Decompress GZIP.
  2. 2Choose one input file up to 10 MiB or use the binary example.
  3. 3Process and inspect the actual before-and-after byte counts.
  4. 4Download the result, which must fit within 20 MiB.

Example

Input
00 ff 10 41 42 0d 0a
Output
GZIP round trip → the same 7 bytes

Compressed bytes may vary across browser implementations.

What happens to your data

Native GZIP processing stays in your browser and does not upload or persist file contents. Page assets and anonymous usage events may use the network. Compression is not encryption.

Last updated October 2026

Compress a local file to GZIP or decompress a .gz file without converting its bytes into text. Choose the operation, select one file, process it and download the result. Binary bytes, line endings and empty files survive a valid compression and decompression round trip.

GZIP handles a byte stream rather than a browsable folder of ZIP members. Decompressing a .tar.gz produces TAR bytes; it does not unpack the TAR archive. The tool does not encrypt data, convert document formats or recover a filename from GZIP metadata.

How it works

The selected input is limited to 10 MiB, and emitted output is capped at 20 MiB. Browser CompressionStream and DecompressionStream process the GZIP stream. Output chunks are counted as they arrive; decompression stops when the actual output exceeds the limit, even if the compressed input is tiny. Use a current browser with native compression stream support.

Compression downloads use the selected source name plus .gz. Decompression removes a final .gz extension when present and otherwise keeps a cleaned input name; the original embedded GZIP filename is not recovered. File bytes are handled directly, without UTF-8 decoding or newline changes. A GZIP made from an already compressed photo may be larger.

Invalid headers, truncated data and failed GZIP integrity checks produce an error. Concatenated members and unusual GZIP features depend on the browser's native decoder and may be rejected; this tool does not promise support for every GZIP variant. Cancel stops the active reader, while clear, replacement and operation changes prevent an older result from appearing.

Processing is local and does not upload file contents or persist them in browser storage. Page assets and anonymous usage events may use the network. A download creates a separate copy on your device. Compression is not a security measure.

Worked example: Binary GZIP round trip

Input
7 bytes: 00 ff 10 41 42 0d 0a
Result
Compress to GZIP, then decompress → the same 7 bytes

Compressed size and header details can vary by browser. The downloaded decompressed bytes are compared with the original.

Common use cases

  • Preparing a small .gz asset for an application
  • Decompressing a log file while keeping its original line endings
  • Testing binary GZIP interoperability with standard tools
  • Removing the outer GZIP layer from a small .tar.gz

Frequently asked questions

Is GZIP the same as ZIP?+

No. ZIP has a directory of named members, while GZIP compresses byte streams. Use ZIP Extractor to list ZIP members. A TAR archive inside GZIP needs a TAR application after decompression.

Can I compress binary files or an empty file?+

Yes. Input bytes are not decoded as text. An empty input produces a valid GZIP stream, which decompresses to an empty file.

Why is my compressed file larger?+

GZIP adds headers and integrity information. Small inputs and already compressed files often grow because that overhead exceeds any compression saving.

How is a GZIP decompression bomb limited?+

The compressed input must fit within 10 MiB. As decompressed chunks arrive, the tool counts their actual length and cancels the reader once output passes 20 MiB.

Does decompression restore the original filename?+

No. The download name is derived from your selected file. It strips a final .gz extension when present. Rename the downloaded file if you know the intended original format.

Will this open every .gz file?+

Native decoder support varies. Damaged files, concatenated members or unusual features can fail. Use a desktop GZIP application when a valid file is outside your browser's supported stream format.