A 17NAS account is created automatically on first sign-in
Tools
Online Gzip Encode/Decode
Compress text into Gzip and encode it as Base64; paste Base64 (URL-safe auto-detected) to restore the original text. Download or upload raw .gz files, with real compression-ratio stats. Everything runs locally in your browser — nothing is uploaded.
🔒 Privacy: all compression and decompression happens locally in your browser (standard CompressionStream API). Input and results are never uploaded and are cleared on refresh.
How to use
Encode: enter any text to get the Base64 representation of its Gzip data, ready to paste into URLs, JSON or config files.
Decode: paste Gzip data as Base64 (standard or URL-safe, auto-detected) to restore the original text.
.gz files: use "Download .gz" to save the input text as a Gzip file, or "Upload .gz" to pick a local .gz file and decompress it to text.
The ratio stats show the real result — very short texts or already-compressed data (JPEG/PNG/MP4/ZIP) can grow larger after Gzip. That is normal header/algorithm overhead, not a tool error.
常见问题
What is Gzip?
Gzip (GNU zip) is a lossless compression format based on DEFLATE (RFC 1952), with a fixed 1F 8B header plus CRC32 checksum and original-length fields. It is the most common HTTP response compression format and is widely used for logs, JSON and other text data in transit and archives.
Why can very short text grow larger after compression?
A Gzip file has a fixed header (magic, flags, timestamp, ~10 bytes) and trailer (CRC32 + original length, 8 bytes), and DEFLATE has almost nothing to squeeze out of non-repetitive content. The 18-byte "测试abc123你好" becomes 39 bytes — that is format overhead, not an error. Only longer, repetitive text shows real savings.
What is the difference between URL-safe and standard Base64?
Standard Base64 uses + and /, which need extra percent-encoding inside URLs or filenames. The URL-safe variant replaces them with - and _ and usually drops the trailing =. This tool auto-detects and normalizes both on decode, and can output URL-safe via the checkbox.
What does the "missing 1F 8B header" error mean?
Valid Gzip data always starts with bytes 0x1F 0x8B. If the Base64 decodes but the leading bytes differ, the data is not Gzip — it may be plain Base64 text, a Base64 of another compression format, or truncated/altered data. Confirm the source really is Gzip Base64.
Is my data uploaded to a server?
No. The tool uses the browser-standard CompressionStream / DecompressionStream APIs and computes entirely locally. Input text, Base64 results and uploaded .gz files never leave your device and are cleared on refresh.
Different tools give different Base64 output — is that a bug?
No. The Gzip header carries metadata (MTIME timestamp, XFL/OS fields) that different implementations fill differently, so the same text can yield different Gzip bytes and thus different Base64 — yet all decompress to the identical original text. Correctness is "round-trips to the input", not byte-for-byte equality.
Gzip vs Deflate vs Brotli?
Deflate is the compression algorithm itself; Gzip = DEFLATE wrapped in a container with CRC32 validation (RFC 1952), the standard for HTTP compression and .gz files; Brotli is a newer algorithm with generally better ratios but different browser/tooling support. In HTTP Content-Encoding they map to gzip / deflate / br.