ApplicationBinary

application/x-xz

XZ

Reference for application/x-xz, the MIME type for XZ-compressed data using LZMA2 for excellent compression ratios.

MIME Type Detector

Drop a file to detect its MIME type — no upload, runs in your browser

📄

Drop any file here or click to choose

Expected extensions: .xz

HTTP Content-Type Header

HTTP Header
Content-Type: application/x-xz

Associated File Extensions

.xz

Quick Facts

MIME Typeapplication/x-xz
CategoryApplication
TypeBinary
Extensions.xz

Common Usage

XZ provides excellent compression ratios using the LZMA2 algorithm, often outperforming gzip and bzip2. It is the default compression for many Linux distribution packages (Arch Linux, Fedora), kernel tarballs, and situations where maximum compression is desired.

Code Examples

HTML
<!-- Link or embed with explicit type -->
<link rel="stylesheet" href="file.xz" type="application/x-xz">

<!-- Or for script/media elements -->
<script type="application/x-xz" src="file.xz"></script>
Node.js
// Express.js
app.get('/file', (req, res) => {
  res.type('application/x-xz');
  res.send(data);
});

// Node.js http
res.writeHead(200, { 'Content-Type': 'application/x-xz' });
nginx
# nginx.conf — add to types block or use default
types {
    application/x-xz  xz;
}

# Or set for a specific location
location /api/ {
    default_type application/x-xz;
}

Related MIME Types

More Application MIME Types

Other application types in the Application family

Related Tools

Explore More MIME Types

Browse our complete reference of 185 MIME types with usage examples, HTTP headers, and code snippets.