.lz4

What is a .lz4 file?

LZ4 is an extremely fast compression algorithm — trading compression ratio for blazing decompression speed.

Safe format
Type Archive
By Yann Collet
MIME application/x-lz4

Drop any file to identify it

No upload. No signup. No sending your file halfway across the internet.
We tell you what it is, right here in your browser.

What is it

LZ4 is the Usain Bolt of compression algorithms. It decompresses at speeds exceeding 4 GB/s on modern hardware — roughly 10x faster than gzip. The tradeoff: files are about 10-20% larger than gzip output. For applications where decompression speed matters more than file size (databases, real-time logging, filesystems), LZ4 is the clear winner.

The algorithm is used inside systems you interact with daily. ZFS and Btrfs filesystems use LZ4 for transparent compression. Linux kernel supports LZ4 for initramfs and kernel compression. Facebook, Apple, and dozens of databases use LZ4 for internal data compression where speed is critical.

For compressing/decompressing files: `lz4 file` compresses, `lz4 -d file.lz4` decompresses. The CLI tool is available via package managers on all platforms. 7-Zip also handles LZ4 files on Windows.

Technical details
Full Name
LZ4 Compressed File
MIME Type
application/x-lz4
Developer
Yann Collet
Magic Bytes
04 22 4D 18
Safety
.lz4 is a known, safe format. Compressed data. The compression format itself is safe.
What opens it
lz4 (CLI)
FREE Windows / Mac / Linux
7-Zip
FREE Windows
FAQ
When should I use LZ4 instead of gzip?
When decompression speed matters more than file size. LZ4 decompresses ~10x faster than gzip with ~10-20% larger files. Use it for databases, real-time systems, and any context where CPU time is more expensive than storage.
Is LZ4 better than Zstandard?
LZ4 is faster at decompression. Zstandard (zstd) compresses better while still being very fast. Zstd is the better general-purpose choice; LZ4 wins when maximum decompression speed is the priority.
Related formats