Skip to main content

Lzip Compress & Decompress

API reference

Compress text into an lzip (.lz) stream as Base64 or hex, or decompress Base64/hex .lz data back to text — encoding auto-detected, CRC32 verified, with size and ratio stats. Runs in your browser; nothing is uploaded.

Input

When decompressing, Base64 and hex are both accepted — the encoding is detected for you.

Output

Output
Stats
PropertyValue
No data yet
Was this helpful?

More ways to use this tool

REST API

curl -X POST https://api.iotools.cloud/v1/tool/lzip-compression \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "compress",
    "inputText": "Compression loves repetition. Compression loves …",
    "level": "6",
    "outputEncoding": "base64"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `lzip-compression` tool (Lzip Compress & Decompress) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Embed widget

<iframe
  src="https://iotools.cloud/embed/lzip-compression/"
  width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
  title="Lzip Compress & Decompress — iotools.cloud"
  sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
  allow="clipboard-write"
  style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>

Drop this into your own page — free, no key required, just a link back.

Cost per API/MCP callFrom 5 credits
Need more credits?View pricing

Also available with

Guides

Compress a piece of text into an lzip (.lz) stream, or paste lzip data and get the original text back. Because a text box can't hold raw binary, the compressed side is written as Base64 or hex. When you decompress, paste either one: the tool works out which encoding you used.

How to use it

  1. Pick a Mode: Compress or Decompress.
  2. Paste your text (to compress) or your Base64 / hex .lz data (to decompress) into Input. The result updates as you type.
  3. When compressing, choose a Compression level and an Output encoding: Base64, lowercase hex or uppercase hex.
  4. Copy or download the Output. The Stats table shows the sizes before and after, the ratio, and, when decompressing, which encoding was detected, that the CRC32 check passed, and the dictionary size the data was written with.

What is lzip?

Lzip is a lossless compressor built on LZMA, the algorithm behind 7-Zip and XZ. Its format is deliberately simple: a short header, the LZMA data, and a trailer holding a CRC32 checksum and the original size. That simplicity makes it popular for long-term archiving and for GNU source releases shipped as .tar.lz. What you compress here decodes with lzip -d or lunzip, and data made by lzip decompresses here.

Compression levels

The levels match lzip -0 to lzip -9. Level 6 is the default. Higher levels use a bigger dictionary, which only helps when the input is large and repetitive. For a few sentences, every level gives about the same size.

Lzip or XZ?

Both use LZMA, so they compress about equally well. An lzip stream has less framing overhead (26 bytes, compared with about 60 for .xz), so it does better on short text. XZ adds a choice of checksums and multi-block streams. If you need the other format, use XZ Compress & Decompress.

What happens if the data is damaged?

Decompression checks the CRC32 and the stored size. If the data was cut short or changed, you get an error instead of silently wrong text. If you paste a different format by mistake, such as gzip, 7z or .xz data, the error names that format. If the decompressed bytes aren't valid UTF-8 text, the output is shown as Base64 so nothing is lost.

Privacy

Compression runs in your browser with a WebAssembly build of the LZMA codec. Your text is never uploaded.

To compress or extract whole .lz or .tar.lz files, use the Lzip File Compressor & Extractor. For the older .lzma format, use LZMA Compress & Decompress.

.lzlunziplzmacompress textdecompressbase64hextar.lz

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.