deflate | compress | inflate

> deflate | compress | inflate <

Compress or inflate raw DEFLATE data (RFC 1951) with Base64 or hex input and output. No headers, no checksums, no uploads.

[01]

Native & Private

Uses the CompressionStream API built into your browser. Your text and files never leave your device.

[02]

Text or Files

Compress typed text or pick a file, then copy the result as Base64 or hex or download the compressed bytes.

[03]

Size Report

See original and compressed sizes with the compression ratio so you know exactly what you saved.

// DEFLATE TECHNICAL INFO

How It Works:

Raw DEFLATE is the bare compressed stream with no header or checksum. It combines LZ77 (replacing repeats with back-references) and Huffman coding in blocks that are stored, fixed-Huffman or dynamic-Huffman. Gzip, zlib, ZIP and PNG all wrap this same stream.

Example:

Text "aaaaaaaaaa" → 4B 4C 84 01 00 (a short literal and a back-reference)

Why Use This Tool:

  • >Inflate raw deflate streams from ZIP entries, SAML redirects and WebSocket permessage-deflate
  • >Compress payloads for protocols that expect headerless DEFLATE
  • >Compare raw, zlib and gzip sizes of the same data
  • >Debug the compressed body of a gzip or zlib file

>> frequently asked questions

Q: What is DEFLATE?

A: DEFLATE (RFC 1951) is a lossless compression algorithm that combines LZ77 and Huffman coding. It is the engine behind gzip, zlib, ZIP and PNG.

Q: What is "raw" deflate?

A: Raw deflate is the DEFLATE stream with no wrapper at all: no magic bytes, no header and no checksum. Many specifications use it, for example SAML HTTP-Redirect binding, ZIP entries and WebSocket permessage-deflate.

Q: How do I compress text with deflate online?

A: Paste text with COMPRESS selected, choose Base64 or hex output, and the raw deflate stream appears. You can also pick a file and download the compressed bytes.

Q: How do I inflate raw deflate data?

A: Switch to DECOMPRESS, select the encoding of your data and paste it. If you get an error, the data might be zlib or gzip instead - try those tools.

Q: Why is there no header or checksum?

A: The raw stream carries no integrity information. Wrappers such as zlib (Adler-32) and gzip (CRC-32) add it, which is why raw deflate is a few bytes smaller than the same data in those formats.

Q: Which format should I use: deflate, zlib or gzip?

A: Use gzip for files and HTTP, zlib for in-memory data streams and libraries, and raw deflate only when a protocol specifically requires headerless data.

Q: Is my data uploaded?

A: No. The page uses the browser's native CompressionStream API and works offline once loaded.

// OTHER LANGUAGES

Deflate Compress & Decompress Online — Base64.sh

Deflate Compress & Decompress Online | Raw DEFLATE (RFC 1951)

Free online raw DEFLATE (RFC 1951) compressor and decompressor. Compress text or files and get Base64 or hex, or inflate raw deflate data.

Share:

References

How we make sure

We check this tool with the automated test suites linked below. Example checks are shown in their original language.

Verification method
Decompress page output in Node and Node output in the page, checking exact bytes.
Comparison reference
Interoperability between browser CompressionStream / DecompressionStream and Node.js zlib.
Verification scope
These samples and boundaries do not prove correctness for every input.
Test source and cases (select a file to read it)

These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.