Extension signing guide
The store only accepts .crx files, and a .crx must be signed with your own private key. This page explains why and how.
Why you must sign it yourself
- The extension ID is derived from the public key. The same private key always yields the same ID; a different key is a different extension.
- The platform never touches the signing. The package is byte-identical to what you signed locally, so users can independently verify it really comes from you.
- The store verifies the signature before installing. A bad or missing signature never even reaches the review queue.
Download the packaging tool
crxgen v0.1.0, a single executable with no dependencies. If it will not run after downloading, add the execute permission first.
| Platform | File | |
|---|---|---|
| macOS (Apple silicon) | crxgen-0.1.0-darwin-arm64 | Download |
| macOS (Intel) | crxgen-0.1.0-darwin-amd64 | Download |
| Linux (x86-64) | crxgen-0.1.0-linux-amd64 | Download |
| Windows (x86-64) | crxgen-0.1.0-windows-amd64.exe | Download |
How to use it
1. Generate a private key (once)
Generates a dedicated ECDSA P-256 private key for this extension. Every extension should have its own.
./crxgen-0.1.0-<your-platform> keygen -out my-plugin-key.pemThe command prints the derived extension ID and reminds you to back up the key. Store the .pem file offline right away.
2. Pack the extension (every update)
-dir points at the extension source folder, -key uses the key from step 1. The tool injects the public key into the manifest key field for you.
./crxgen-0.1.0-<your-platform> pack -dir ./my-extension -key my-plugin-key.pem -out my-extension.crxThe resulting .crx is what you upload. Pack again with the same key and the extension ID stays the same.
3. Upload
Go back to My extensions and upload the .crx. For the reviewed flow, upload on the extension detail page; for the no-review self-upload channel, use the button on the list page.
Folder layout
The folder you pass to -dir should look like this. manifest.json must sit directly in it, not one level deeper.
my-extension/
├── manifest.json # required; name / version / manifest_version
├── background.js
├── content.js
├── popup.html
├── icons/
│ ├── icon16.png
│ ├── icon48.png
│ └── icon128.png
└── _locales/ # optional: localization
└── zh_CN/
└── messages.jsonPackage with Chrome
If you prefer a graphical interface, you can use Chrome’s built-in packaging tool to create a .crx. These steps use desktop Chrome.
1. Prepare the extension folder
Make sure the extension source is built and manifest.json is at the top level of the extension folder.
- Open Chrome and go to chrome://extensions.
- Turn on Developer mode in the upper-right corner.
2. Open the packaging tool
Find the packaging option on the extensions page. Its location or label can vary between Chrome versions.
- Click “Pack extension”.
- For “Extension root directory”, select the folder that contains manifest.json.
- For the first package, leave the private key field empty and click “Pack extension”. Chrome creates a .crx package and a .pem private key.
3. Keep the key and upload
Every later update must use the same private key, or the extension ID will change.
- Move the generated .pem out of the extension folder and keep an offline backup somewhere safe. Never upload or share it.
- Return to the developer center and upload the .crx. For future packages, select the saved .pem in the private key field.
FAQ
Can I use Chrome's packaging tool?
Yes, as long as it produces a standard CRX3 signed with an ECDSA P-256 key. crxgen just saves you from setting up a Go toolchain.
What if I lose my private key?
It cannot be recovered, and the platform never holds it. Existing users will not get updates; you would republish under a new ID with a new key. Back it up.
Can one key sign several extensions?
Technically yes, but do not. The ID derives from the key, so every extension signed with the same key shares one ID and they overwrite each other in the store. Use one key per extension.
Packing says manifest.json not found?
-dir must point at the level that contains manifest.json. If your source has my-extension/src/manifest.json, pass -dir ./my-extension/src.
