Comment utiliser : Gzip Compress & Decompress
- Choose Compress or Decompress and the format: gzip, zlib or raw deflate.
- Type or paste text, or click Open file to load any file (a
.gzfile switches to decompress automatically). - For compression, pick a level from 1 (fastest) to 9 (smallest). The result appears as Base64 or hex.
- Download the result, or press Reverse to feed it back in and check the round trip.
What is gzip?
Gzip is the most widely used lossless compression format on the web and in Unix tools. It wraps the DEFLATE algorithm (LZ77 back-references plus Huffman coding) with a small header and a CRC-32 checksum. Web servers use it to shrink HTML, CSS, JavaScript and JSON responses, and command-line tools use it for .gz and .tar.gz archives.
Gzip, zlib and raw deflate
| Format | Header | Checksum | Where you see it |
|---|---|---|---|
| Gzip | 10 bytes, starts with 1f 8b | CRC-32 | .gz files, Content-Encoding: gzip |
| Zlib | 2 bytes (often 78 9c) | Adler-32 | PNG internals, PDF streams, many APIs |
| Raw deflate | none | none | ZIP entries, WebSocket permessage-deflate |
All three compress to almost exactly the same size; only the wrapper differs. When decompressing, the tool recognizes gzip and zlib headers automatically, so you can paste data without knowing which one it is.
Compression levels
Level 1 is fastest, level 9 searches hardest for matches. On typical text, level 6 (the default in gzip, nginx and Node.js) is within a few percent of level 9 at a fraction of the CPU time. Use Compare algorithms to see the real numbers for your input, including Brotli.
Why Base64?
Compressed data is binary and would be garbled if shown as text. Base64 turns it into safe ASCII so you can paste it into JSON, environment variables, URLs or test fixtures — at the cost of about 33 % more size. Download the result to get the raw binary .gz file instead.
Common questions when decompressing
- “Invalid data” usually means the input is Brotli, or the Base64 was cut off. Try the Brotli tab, or check the string is complete.
- A .tar.gz file decompresses to a
.tararchive, which you can then open with any archive tool. - Already-compressed files (JPEG, MP4, ZIP) do not get smaller — the data has no redundancy left.
Want to know whether your website already serves gzip? Run the website compression test.
Aussi recherché comme : gzip online, gunzip online, decompress gz file, gzip base64, deflate online, zlib decompress, compress text online, open gz file.
Outils complémentaires : Gzip Compress & Decompress
- Brotli Compress & Decompress — Compress text or files with Brotli at any quality from 0 to 11, decompress .br data, and compare the result against gzip — all locally in your browser.
- Encodage / Décodage Base64 — Convertissez du texte au format Base64 et inversement, avec une prise en charge complète de l'UTF-8 (accents, emojis) ; passez au format Base64 compatible URL, ou glissez-déposez un fichier pour obtenir sa chaîne Base64 ou son URI de données.
- JavaScript Minifier — Paste JavaScript and get production-ready minified code from Terser — the same engine used by Vite, webpack and Rollup — with real before/after and gzipped sizes.
- HTML Minifier — Shrink HTML pages and templates by removing comments and redundant whitespace, minifying inline <style> and <script>, and cleaning up attributes — while keeping the layout identical.