Manifest file format for extensions
Every extension for Microsoft Edge has a JSON-formatted manifest file, named manifest.json
. The manifest file is the blueprint of your extension. The manifest file includes information such as:
- The version number of the extension.
- The title of the extension.
- The permissions that are needed for the extension to run.
Manifest V2 is deprecated
Use Manifest V3 for new code. The format for manifest.json
for extensions is moving from Manifest V2 to Manifest V3. Both formats are shown here. To migrate a Manifest V2 extension to Manifest V3, see Migrate an extension from Manifest V2 to V3.
Format of manifest.json for extensions
The following code shows the fields that are supported in manifest.json
for extensions, for a Manifest V3 or V2 package.
For reference information about each field, see Manifest file format in Chrome Extensions > Reference, and then click the links on the fields.
{
// Required
"manifest_version": 3,
"name": "My V3 Extension",
"version": "versionString",
// Recommended
"action": {...},
"default_locale": "en",
"description": "A plain-text description",
"icons": {...},
// Optional
"action": ...,
"author": ...,
"automation": ...,
"background": {
// If `background` is included, `service_ worker` is required
"service_worker": ...
},
"chrome_settings_overrides": {...},
"chrome_url_overrides": {...},
"commands": {...},
"content_capabilities": ...,
"content_scripts": [{...}],
"content_security_policy": "policyString",
"converted_from_user_script": ...,
"current_locale": ...,
"declarative_net_request": ...,
"devtools_page": "devtools.html",
"differential_fingerprint": ...,
"event_rules": [{...}],
"externally_connectable": {
"matches": ["*://*.contoso.com/*"]
},
"file_browser_handlers": [...],
"file_system_provider_capabilities": {
"configurable": true,
"multiple_mounts": true,
"source": "network"
},
"homepage_url": "http://path/to/homepage",
"host_permissions": [...],
"import": [{"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}],
"incognito": "spanning, split, or not_allowed",
"input_components": ...,
"key": "publicKey",
"minimum_chrome_version": "versionString",
"nacl_modules": [...],
"natively_connectable": ...,
"oauth2": ...,
"offline_enabled": true,
"omnibox": {
"keyword": "aString"
},
"optional_permissions": ["tabs"],
"options_page": "options.html",
"options_ui": {
"chrome_style": true,
"page": "options.html"
},
"permissions": ["..."],
"platforms": ...,
"replacement_web_app": ...,
"requirements": {...},
"sandbox": [...],
"short_name": "Short Name",
"side_panel": {...},
"storage": {
"managed_schema": "schema.json"
},
"system_indicator": ...,
"tts_engine": {...},
"update_url": "http://path/to/updateInfo.xml",
"version_name": "aString",
"web_accessible_resources": [...]
}
Changes in manifest.json V3 vs. V2
V3 | V2 |
---|---|
"manifest_version": 3, |
"manifest_version": 2, |
"action": {...}, |
"browser_action": {...}, |
"action": {...}, |
"page_action": {...}, |
removed | "persistent": false, |
If background is included, service_ worker is required |
If background is included, service_ worker is optional |
Separated into two different keys: "permissions": [...], "host_permissions": [...], |
"permissions": [...], |
See also
- Migrate an extension from Manifest V2 to V3
- Manifest file format - V3, in Chrome Extensions > Reference.
- Manifest file format (V2) in Chrome Extensions > Reference.
Note
Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons Attribution 4.0 International License. The original page is found here.
This work is licensed under a Creative Commons Attribution 4.0 International License.