katlab tools/text-compress

Text Compression · Gzip, Deflate & LZ-string

Compress text to a Base64 or URL-safe string, or paste a compressed blob and get the text back — all in your browser.

Everything is processed locally. Safe for configs and payloads with secrets.

Compress

Decompress

How to compress text online (free)

Paste your text, pick an algorithm and an output encoding, and click Compress. To reverse it, paste any compressed Base64 (or URL-safe) string into Decompress — the tool sniffs gzip, zlib, raw deflate and LZ-string automatically. Compression uses the browser's native CompressionStream, so it matches what gzip produces on a server.

Which algorithm should I pick?

FormatBest for
gzipInterop with servers, logs and APIs — the common "gzip + Base64" blob format. Has a small header and checksum.
deflate (zlib)The same DEFLATE stream with a 2-byte zlib wrapper — what most libraries call "deflate".
deflate (raw)Bare DEFLATE, smallest output of the three — when the other side expects no wrapper.
LZ-stringSharing state in URLs. Its URL-safe mode uses only URL-legal characters and needs the LZ-string library on the other side.

Decode a gzip + Base64 blob from logs or an API

Compressed-then-Base64'd payloads show up everywhere: config blobs, API responses, log fields, JWT-adjacent claims. Most online decoders make you paste that data into an ad-filled page that ships it to a server. Here the blob is decoded and inflated on your device — nothing leaves the tab, so it's safe even when the payload contains tokens or secrets.

Why URL-safe Base64?

Standard Base64 uses +, / and =, which need percent-encoding inside URLs. The URL-safe variant swaps them for - and _ and drops the padding, so the result can go straight into a query string.

Is my data private?

Yes. Everything runs in your browser tab and keeps working offline once the page has loaded. Nothing you paste is sent anywhere.