LZ-String Compressor
Compression ยท Free Online Tool
lz-string compress/decompress for short text in URLs/LocalStorage.
Click "Compress" to run...Pure JavaScript
Runs entirely in JS โ works in any browser, even old ones without CompressionStream.
Great for Storage
Ideal for stuffing large JSON into localStorage, cookies, or short URLs.
Base64 Output
Output is safe to embed in JSON, URLs, and text fields.
How to Use LZ-String Compressor
- 1Enter or paste the text you want to compress.
- 2Select the compression algorithm (gzip, deflate, or brotli).
- 3Click compress to reduce the data size.
- 4Copy or download the compressed output.
Features
- โ100% free โ no signup, no subscription, no ads
- โRuns entirely in your browser โ data never leaves your device
- โFast and lightweight โ instant results
- โCross-platform โ works on desktop, tablet, and mobile
Frequently Asked Questions
What compression algorithms are supported?
We support gzip, deflate, and brotli compression algorithms for text data.
Is there a file size limit?
Since tools run in your browser, the limit depends on your device memory. Most tools handle several megabytes without issues.
Related Tools
Gzip / Brotli Compressor
Compress and decompress text with gzip and deflate streams.
Deflate Compressor
Deflate algorithm compress/decompress (native CompressionStream).
Zlib Compressor
Zlib format (RFC 1950) compress and decompress.
Raw Deflate Compressor
Raw Deflate stream without zlib header compress/decompress.
LZUTF-8 Compressor
LZUTF-8 compress/decompress optimized for UTF-8 text.
LZMA Compressor
LZMA/LZMA2 high-ratio compress and decompress.
Learn the concept
Learn the concept
Understand the programming ideas behind this tool.