Skip to main content
NeatUtility

Gzip & Deflate Compressor / Decompressor

Encoders & Decoders100% Client-Side
Ready
TEXT
0 lines0 chars
0 B / 4.77 MB
About this tool, examples & FAQ

Compress raw text into Gzip, Deflate, or Deflate-Raw byte streams encoded as Base64 or Hexadecimal, or decompress existing compressed payloads back to readable UTF-8 text with 100% client-side privacy.

Key facts

Verified capabilities and limits of this utility
Compression StandardsGzip (RFC 1952), Deflate (RFC 1950), Deflate Raw (RFC 1951)
Execution EngineNative browser CompressionStream & DecompressionStream
Maximum Input5 MB
Execution Deadline3 s

How to use

  1. Select your desired operation: Compress (Text to Gzip) or Decompress (Gzip to Text).
  2. Choose your container format: Gzip (.gz), Deflate (zlib), or Deflate Raw.
  3. Select output encoding for compressed data (Base64 or Hexadecimal).
  4. Paste your text or compressed payload into the input pane and click Run.
  5. Click Swap at any time to invert between Compress and Decompress directions.

Examples

Compress text into Base64 Gzip payload

Input

Hello, world!

Example output

H4sIAAAAAAAACvNIzcnJ11Eozy/KSVEEAObG5usNAAAA

Decompress Base64 Gzip payload back into plain text

Input

H4sIAAAAAAAACvNIzcnJ11Eozy/KSVEEAObG5usNAAAA

Example output

Hello, world!

Edge cases

Magic Byte Verification (0x1F, 0x8B)

Standard Gzip payloads always begin with the magic bytes 0x1F and 0x8B (or 'H4sI' in Base64). If non-gzip data is supplied to the decompressor, a clear diagnostic error is generated rather than silent failure.

Gzip vs Deflate vs Deflate Raw Streams

Deflate Raw contains pure compressed LZ77/Huffman blocks (RFC 1951), Deflate adds a 2-byte zlib header and Adler-32 trailer (RFC 1950), and Gzip encapsulates the stream with a 10-byte header, CRC32 checksum, and length trailer (RFC 1952). Matching the correct format option ensures successful decompression.

Encoding Auto-Detection

When decompressing payloads, the executor automatically detects whether the input consists of hexadecimal characters or Base64 notation, tolerating whitespace and newlines common in copy-pasted logs.

How it works

  1. Converts input string data into raw byte buffers using the standard Web TextEncoder API.
  2. Pipes byte streams through the high-performance browser CompressionStream or DecompressionStream pipeline.
  3. Encodes binary compressed bytes into safe transport representations (Base64 or Hex).
  4. Executes entirely within an isolated browser Web Worker without any remote server requests or uploads.

Frequently asked questions

What is Gzip compression?

Gzip is a widely used file format and software application used for data compression. It uses the DEFLATE algorithm, which combines LZ77 dictionary compression with Huffman coding to substantially reduce text and data sizes.

Why is the compressed output encoded as Base64 or Hex?

Gzip produces arbitrary binary bytes that cannot be safely displayed or copied as plain text. Encoding the binary stream as Base64 or Hex allows you to inspect, copy, and transmit the compressed payload through text-only mediums.

Is my compressed data sent to external servers?

No. All compression and decompression happens entirely client-side in your browser using the W3C Compression Streams API. No data leaves your device.

References