XZ Compress
Compress text or encoded binary data to XZ online and output the result as Hex or Base64. Read more
What is XZ compress?
XZ is a general-purpose container format commonly carrying LZMA2-compressed data. The official .xz format specification defines stream headers, blocks, indexes, and integrity checks. This tool creates a complete .xz stream from text or encoded bytes; it does not create a multi-file archive.
How to use this tool
Enter text or encoded bytes, select the byte encoding, choose preset level 0–9, and output the XZ bytes as Hex or Base64. Hex and Base64 input are decoded before compression. Use XZ Decompress to restore the result.
Choosing the right format
Base64 is more compact for transporting binary data as text; Hex is easier to inspect. XZ presets affect dictionary size, CPU use, and both compression and decompression memory. The XZ Utils manual cautions against blindly choosing level 9: levels 7–9 mainly help sufficiently large input and can require much more memory.
Important limitations
XZ is not encryption. Its integrity check detects accidental corruption but does not authenticate the sender. Already-compressed or short data may grow. Browser and WebAssembly memory limits make native streaming XZ tools preferable for large input or high presets.
Frequently asked questions
Why can another program not open the result?
Decode the Hex or Base64 result into bytes and confirm the receiver expects the .xz container, not legacy .lzma, raw LZMA2, or a .tar.xz archive.
Are my files uploaded?
No. Compression runs locally in the browser. For files or folders, use XZ Create.