Free & private
Compression

Deflate and Base64 compress

Compress text with raw DEFLATE and read it straight back. The compressed bytes are shown as Base64 so the result stays copy-and-paste friendly.

Reversible100% FreeNo upload
Deflate + Base64
Compression · reversible · UTF-8
try
Input0 chars · 0 bytes
Output0 chars · 0 bytes
UTF-8 · ready⌘⏎ copy⌘⇧S swap● local

What this does

DEFLATE is the compression algorithm behind zip, gzip and PNG. This tool runs raw DEFLATE over your text, then Base64-encodes the compressed bytes so you get a plain-text string you can store or send. Decode reverses both steps — Base64 back to bytes, then inflate back to the original text. For repetitive or lengthy input, the result can be dramatically smaller than the source.

How to use this tool

  1. Paste text and Encode to compress and Base64 it in one step.
  2. Paste a compressed string and Decode to inflate it back to text.
  3. Turn on URL-safe Base64 if the result needs to travel in a URL.

When compression helps — and when it does not

Compression pays off on long, repetitive text: JSON, logs, markup, source code. On very short strings the DEFLATE and Base64 overhead can make the output larger than the input, so it is only worth it past a certain length. The deflate stream here is raw (no gzip or zlib header), which matches what many languages call "inflate/deflate" rather than "gzip".

Browser support

This tool uses the browser's built-in Compression Streams. It works in current versions of Chrome, Edge, Firefox and Safari. If your browser is older and reports that the feature is missing, update it and the tool will work.

Examples

Inputencode encode encode encode encode
OutputS81Lzk9JVUjFTQEA

Frequently asked questions

What compression format is this?
Raw DEFLATE — the same core algorithm used by zip and gzip, but without a container header. The compressed bytes are then shown as Base64.
Why is my compressed output sometimes bigger than the input?
Compression has a small fixed overhead, and Base64 adds about a third. On very short text that overhead outweighs the savings; compression only helps on longer, repetitive input.
Is this gzip?
No. It is raw DEFLATE, which is what many languages expose as inflate/deflate. Gzip adds an extra header and checksum that this format does not include.
Does my text leave the browser?
No. Compression and Base64 both run locally using the browser’s Compression Streams API.

Related tools

Every tool on encoder.website converts your text and hands the result straight back — it is never stored. Pick another tool from the sidebar any time.