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
- Paste text and Encode to compress and Base64 it in one step.
- Paste a compressed string and Decode to inflate it back to text.
- 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
Frequently asked questions
What compression format is this?
Why is my compressed output sometimes bigger than the input?
Is this gzip?
Does my text leave the browser?
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.