Originally published on ExtensionLaunch.
If you want to package a Chrome extension for the Chrome Web Store, the file you need is a ZIP, not the CRX that Chrome's "Pack extension" button gives you. Below is a short, practical walkthrough: which file format serves which purpose, the commands that build a clean archive, and a quick lookup table for the upload errors that stop most first submissions.
ZIP, CRX or PEM: pick the right file
Three files show up when people talk about packaging, and they do different jobs:
| File | What it is | Use it for |
|---|---|---|
.zip |
Plain archive of your extension files | Every Chrome Web Store upload (also Edge Add-ons and Opera) |
.crx |
ZIP plus a signed header, created by Chrome | Testing a packed build, enterprise or self-hosted installs, verified CRX uploads |
.pem |
Private key that signs the CRX | Re-signing later versions; never upload or share it |
The store signs and distributes your extension itself, so most developers never ship a CRX to anyone.
Get the build folder ready first
Zip what your build tool outputs (usually dist/, build/ or .output/chrome-mv3/), not your source tree. Before archiving, run through this list:
-
manifest.jsonsits at the top level of the folder, not inside a subfolder. - The
versionis greater than the one already published. Google suggests something small like0.0.0.1for a first upload. - The manifest contains no comments. JSON doesn't allow them, and they're the usual reason for "Cannot parse the manifest".
- Every file the manifest references exists, with identical capitalization: icons, service worker, content scripts, popup,
_locales. - Nothing private is included. Keep
.envfiles, API secrets,node_modules,.gitand test fixtures out. Source maps are allowed but reveal your original code. Anyone who installs the extension can download what's inside.
Build and verify the ZIP
The rule is the same everywhere: compress the contents of the build folder, not the folder itself. If you zip the folder, manifest.json ends up one level too deep and the upload fails.
On macOS or Linux:
cd dist
zip -r -X ../my-extension-1.4.0.zip . -x '*.DS_Store' -x '*.map'
cd ..
On Windows PowerShell, the trailing \* is what keeps the root folder out of the archive:
Compress-Archive -Path .\dist\* -DestinationPath .\my-extension-1.4.0.zip -Force
One caveat: Compress-Archive skips hidden files, so it won't include dot-prefixed files. Also, use a fresh file name for each release so an old archive can't keep files you've since removed.
Then spend a minute checking the archive:
unzip -l my-extension-1.4.0.zip | head -20 # manifest.json should be at the top, not dist/
unzip -p my-extension-1.4.0.zip manifest.json | python3 -m json.tool > /dev/null && echo "manifest OK"
Last, test the exact build you're about to ship. Extract the ZIP into a new folder and load that folder unpacked. Google warns that packed and unpacked extensions can behave differently.
If you use a framework, wxt zip (WXT) or pnpm build --zip (Plasmo) builds and packages in one command. You can get the same consistency with a package npm script that builds and then zips dist/.
When you actually need a CRX
Create one from chrome://extensions: turn on Developer mode, click Pack extension, choose the folder that contains manifest.json, and leave the key field empty the first time. Chrome saves a .crx and a .pem next to that folder. From the CLI:
google-chrome --pack-extension=/path/to/dist
google-chrome --pack-extension=/path/to/dist --pack-extension-key=/path/to/dist.pem
Guard the .pem. The key determines which extension a CRX belongs to, so signing with a new key makes Chrome treat the package as a different extension. Store it in a password manager or vault and add *.pem to .gitignore.
The store only accepts a CRX after you opt into Verified CRX Uploads in the Developer Dashboard. After that, every update has to be signed with the key you registered (generated with openssl genpkey as a 2048-bit RSA key). This protects you if your account is compromised, but replacing a lost key through support can take up to a week.
Common packaging errors and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| "Cannot parse the manifest" | Comments or invalid JSON | Remove comments, validate, rezip |
| Manifest missing or unreadable | Manifest is inside a subfolder | Zip the folder's contents |
| Version rejected | Version isn't higher than the live one | Bump version and repackage |
| "Your item has packaging errors" | A file the manifest references is missing or has the wrong path | Check the build output, not the source |
| Works unpacked, fails packed | Case mismatch (Background.js vs background.js) |
Match the case exactly |
_locales subtree missing |
default_locale set without messages.json |
Add the locale folder or remove the key |
CRX_REQUIRED_PROOF_MISSING |
The CRX wasn't signed by the store | Load the extracted folder for testing; use enterprise policies for managed devices |
A good side effect: the same ZIP usually uploads to Edge Add-ons and Opera without changes. Firefox is different. If your code is bundled or minified, AMO may ask for a separate source archive.
Key takeaways
- The Chrome Web Store needs a ZIP with
manifest.jsonat its root. A CRX is for testing, enterprise installs or verified uploads. - Zip the contents of your build output, then list and validate the archive before you upload.
- Keep secrets,
.env,node_modulesand.gitout of the package. - Back up your
.pemkey and keep it out of your repository. - Most rejections come from manifest comments, missing files, case mismatches or a version that wasn't bumped.
The original article has the full checklist, FAQs and a deeper look at verified uploads: how to package a Chrome extension as a ZIP or CRX and fix upload errors. Once your build passes review, you can list it in the ExtensionLaunch Chrome extension launch directory to get it in front of early users.
What packaging mistake has cost you a rejected upload, and how did you catch it?
Top comments (0)