---
title: "XZ Compress Online — Smallest Single Files | Compress Pro"
description: "Compress files to .xz in your browser — LZMA2 squeezes text and data harder than gzip or bzip2. One output per input, private, nothing uploaded."
canonical: https://compress-pro.com/xz-files
---

# XZ-compress files.

> XZ squeezes hardest — compress files on your own device.

XZ is the strongest of the classic unix compressors — the same LZMA2 engine 7Z uses, wrapped in a single-file stream. Drop files and each returns as its own .xz, **built locally**. Expect the smallest results on text and data, at the cost of more compute than gzip.

**No uploads · No ads · Free & open source.**

## How it works

1. Drop files anywhere on the page, click to browse, or paste with Ctrl/⌘ + V.
2. Pick a quality or preset — or set an exact target size and let the tool find it.
3. Compress, compare before/after, and download — individually or as a ZIP.

## Where xz earns its CPU bill

Compress once, download many — that is the xz sweet spot: release artifacts, datasets, backups. For quick one-off transfers [gzip](https://compress-pro.com/gzip-files) finishes faster than xz starts mattering. Bundling a folder first? [Create TAR.GZ](https://compress-pro.com/create-tar-gz) switches to tar.xz with one pill; a full archive with encryption is [Create 7Z](https://compress-pro.com/create-7z).

## Frequently asked questions

### How much smaller is xz than gzip really?

On text, source code and databases, 25-40% smaller output is typical; on mixed content less; on already-compressed media, nothing — no compressor beats entropy. The Max level widens the gap further at a real time cost.

### What opens .xz files?

xz and unxz on every unix, 7-Zip and modern archive managers on Windows, The Unarchiver or Keka on macOS. It has been the default compression of kernel releases and many Linux packages for over a decade — support is everywhere that matters.

### Why not just use 7Z?

Same engine, different wrapper: .xz holds exactly one stream and slots into unix pipelines (tar.xz, xz -d, streaming); .7z is a full archive with a file list, encryption and per-file access. Machines usually want xz, humans usually want 7z.

### Is it private?

Yes. Archives are built and converted entirely in your browser — neither the archive nor the files inside it are ever uploaded, and any password you set is applied locally. The server does nothing but deliver this page. Want proof? Run one file through, switch your connection off, and run another — it still works.

## Related tools

- [Gzip files](https://compress-pro.com/gzip-files)
- [Bzip2 files](https://compress-pro.com/bzip2-files)
- [Create 7Z archives](https://compress-pro.com/create-7z)

---

Part of [Compress Pro](https://compress-pro.com/) — every tool page has a markdown twin at `<page url>.md`. Full tool index: [llms.txt](https://compress-pro.com/llms.txt)
