Skip to main content

LZ4 Compression Tool

Compress or decompress data with the fast LZ4 algorithm, right in your browser — from a file, pasted text, or Base64. Get the Base64 result plus size and ratio stats.

Input

Drop a file or browse
One file · any type

The file is read locally in your browser — it is never uploaded.

Or

Output

Statistics
StatisticValue
No data yet
Output
Was this helpful?

Guides

Compress and decompress data with LZ4, one of the fastest lossless compression algorithms in existence. Paste text, drop in a file, or supply Base64-encoded LZ4 data, and this tool produces a Base64 result you can copy or download, alongside a compact stats table showing the size before and after and the compression ratio achieved.

LZ4 trades a little compression ratio for enormous speed. It compresses and decompresses at gigabytes per second, which is why it shows up everywhere latency matters: filesystems (ZFS, Btrfs), databases, game assets, network protocols, and log pipelines. It is not the tool for squeezing an archive to the smallest possible size — reach for zstd, gzip, or xz for that — but when you need data smaller and need it back instantly, LZ4 is hard to beat.

How to use it

  1. Choose Compress or Decompress.
  2. Provide your input — upload a file, or paste text into the box.
    • In Compress mode, pasted text is treated as UTF-8 and turned into an LZ4 frame.
    • In Decompress mode, pasted text is treated as Base64-encoded LZ4 frame data (the same format this tool produces when compressing).
  3. Click Process. The result appears as a Base64 string, ready to copy or download, with the size and ratio stats beside it.

Decompressed output that is valid UTF-8 text is shown as text; binary results are shown as Base64 so nothing is mangled in your browser.

The Base64 output

Because compressed LZ4 data is binary, this tool encodes the result as Base64 so it is safe to copy, paste, and store as plain text. To go the other way, paste that same Base64 back in with Decompress selected. When you download a result, you are downloading the Base64 text; decode it back to bytes if you need the raw .lz4 frame.

Why did my text get bigger when compressed?

LZ4 frames carry a small amount of header and checksum overhead. For very short or already-random input there is nothing to compress, so the framed output can end up slightly larger than the original. Compression pays off on real, repetitive data — logs, JSON, source code, prose — where you will typically see the output shrink dramatically.

Privacy

Everything runs entirely in your browser — locally, client-side. Your files and text are never uploaded to a server, so you can compress or decompress sensitive data, credentials, or private documents with confidence. Close the tab and nothing is left behind.

lz4compressiondecompressbase64converter

Love the tools? Lose the ads.

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