Extension Manifest Converter is an open source tool that helps convert existing Chrome extensions to Manifest V3. Use it to convert an entire directory, extension zip file, or just a manifest.json file. All expected changes are applied to manifest.json.
- Performs conversions on
- unpacked extension directories
- zip files containing an extension
- manifest.json
- General manifest.json conversions
- Updates
manifest_version
field - Converts between host permissions declared in
permissions
oroptional_permissions
in MV2 andhost_permissions
in MV3 - Converts between a
content_security_policy
string in MV2 andcontent_security_policy
object withextension_pages
andsandbox
properties in MV3 - Converts between
background.scripts
in MV2 and background service workersbackground.service_worker
in MV3
- Updates
- Scripting API conversions
- Converts
chrome.tabs.executeScript
in MV2 tochrome.scripting.executeScript
in MV3. If necessary, also addsscripting
to thepermissions
array in manifest.json. - Converts
chrome.tabs.insertCSS
in Mv2 tochrome.scripting.insertCSS
in MV3. If necessary, also addsscripting
to thepermissions
array in manifest.json.
- Converts
- Action API conversions
- Converts calls to
chrome.browserAction
andchrome.pageAction
in MV2 intochrome.action
in MV3 - Converts
browser_action
andpage_action
manifest entries in MV2 intoaction
in MV3
- Converts calls to
This tool aims to simplify the MV3 conversion; it does not fully automate the process. Only search
and replace changes are applied to .js
files.
This tool does not:
- update any service worker code that relies on a DOM
To use this tool, you'll need to set it up by following the steps below.
-
Make sure Python 3 is installed.
python3 --version
If you don't see a version number, follow your OS's guidance to install Python 3 or visit https://www.python.org/downloads/ to download a recent release.
-
Clone this repo using the below command.
git clone https://github.com/GoogleChromeLabs/extension-manifest-converter
-
cd
into the cloned project directory. -
Execute the test command.
python3 emc.py
The tool should log basic usage information to the console.
-
Convert a directory
python3 emc.py dir/path/
-
Convert a manifest file
python3 emc.py manifest.json
-
Convert a .zip file
python3 emc.py extension.zip
This is not an official Google product.