
How to Lock Your Chrome Extension ID During Development
How to Lock Your Chrome Extension ID During Development
If you’re building a Chrome Extension for real projects, you’ll probably run into this problem sooner or later: Your extension ID keeps changing each time.

Suddenly, your OAuth redirect stops working, or your backend whitelist fails, or Firebase throws errors. When you load an unpacked extension, Chrome gives it a random ID. If your setup relies on a fixed extension ID, this quickly becomes a headache.
Step 1: Open the Extensions Page
Go to chrome://extensions and enable Developer Mode (top right).
Step 2: Pack the Extension 📦
Click Pack extension. Select your extension folder and click Pack. Chrome will generate a .crx file and a .pem file.
Step 3: Install the Packed Extension
Drag and drop the generated .crx file into the extensions page. Chrome now assigns a consistent ID based on that private key.
Step 4: Copy the Extension ID
Go to the extensions page and copy the Extension ID. You’ll need it for the next step.
Step 5: Find the Installed Extension Folder
Go to your Chrome profile directory and find the folder that matches your extension ID.
# On Mac:
/Users/{user}/Library/Application Support/Google/Chrome/Default/ExtensionsStep 6: Open the installed manifest.json
Inside the ID folder, open the manifest.json file. You will see a "key" field.
"key": "MIIBIjANBgkqh..."
Step 7: Paste the Key Into Your Development Manifest
Copy that entire key value and paste it into your development manifest.json. Now, whenever you load your unpacked extension, Chrome will use the same ID every time.
Important: Before uploading your extension to the Web Store, remove the “key” field. Google will automatically generate a new production ID.