What is a .xpi file?
Mozilla Cross-Platform Installer (Firefox Add-on) · Archive · Mozilla · 2000
An .xpi file is a Firefox (and Thunderbird) extension package: a ZIP archive holding the add-on's manifest, scripts and icons. Firefox installs it directly; everything else can simply unzip it.
What is a .xpi file used for?
XPI (pronounced 'zippy' at Mozilla) dates back to the Netscape XPInstall system. A modern WebExtension .xpi contains a manifest.json plus JavaScript and assets, and must normally be signed by Mozilla before release-channel Firefox will install it.
Because it is plain ZIP under the hood, renaming to .zip and extracting shows exactly what an add-on does, a useful transparency check before trusting one.
What opens a .xpi file?
The .xpi format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.
Windows
- Firefox (installs it)
- 7-Zip (inspect)
macOS
- Firefox
- The Unarchiver (inspect)
Linux
- Firefox
- unzip (inspect)
Open a .xpi file step by step
- Confirm the file really is a .xpi. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
- On Windows, open it with Firefox (installs it) or 7-Zip (inspect).
- On Mac, use Firefox or The Unarchiver (inspect).
- On Linux, try Firefox or unzip (inspect).
- Still stuck? Convert the .xpi to zip (rename), which opens more widely.
Why can't I open my .xpi file?
Almost always because no installed app understands XPI. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.
The other possibility is that the file is not really a .xpi at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.
How to convert a .xpi file
You can convert a .xpi file to zip (rename) using a conversion tool or the export menu of an app that opens it.
What is the .xpi file signature (magic bytes)?
A .xpi file starts with the hex bytes 50 4B 03 04, which read as PK.. in ASCII. Programs identify XPI by those bytes, not by the filename, so a renamed file still gives itself away.
These are the documented signatures for XPI. For a full breakdown, see the ZIP file signature page.
| Hex signature | Offset | ASCII | Note |
|---|---|---|---|
| 50 4B 03 04 | 0 | PK.. | ZIP package (PK..) |
See the full magic-numbers reference for every format.
Frequently asked questions
What is a .xpi file?
An .xpi file is a Firefox (and Thunderbird) extension package: a ZIP archive holding the add-on's manifest, scripts and icons. Firefox installs it directly; everything else can simply unzip it.
How do I install an .xpi file in Firefox?
Drag it into a Firefox window or open it via the menu. Firefox verifies Mozilla's signature and asks for the extension's permissions before enabling it.
Why won't Firefox install my .xpi?
Release Firefox refuses unsigned extensions. Get the add-on from addons.mozilla.org, or use Firefox Developer Edition/Nightly if you are testing your own unsigned build.
What is inside an .xpi file?
A ZIP archive with manifest.json describing the extension plus its JavaScript, HTML and icons. Rename to .zip and extract it to look.
Related formats
Sources
Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.