Manifest File Format - Chrome For Developers
Manifest File Format - Chrome For Developers
Examples
Manifest le format
Manifest keys
Home Docs Chrome Extensions Reference Manifest Was this helpful?
Shared modules
Keys required by the Extensions pla orm
Overriding Chrome se ings Manifest le format Keys required by Chrome Web Store
Optional keys
author Every extension must have a manifest.json le in its root directory that lists important information about the
structure and behavior of that extension. This page explains the structure of extension manifests and the features they Optional ChromeOS keys
background
can include.
content_scripts
Examples
cross_origin_embedder_
policy
The following example manifests show the basic manifest structure and some commonly used features as a starting
content_security_policy point for creating your own manifest:
cross_origin_opener_policy
Minimal manifest Register a content script Inject a content script Popup with permissions Side panel
description
{
default_locale
"manifest_version": 3,
"name": "Side panel extension",
event_rules
"version": "1.0",
"description": "Extension with a default side panel.",
externally_connectable "icons": {
"16": "images/icon-16.png",
le_handlers "48": "images/icon-48.png",
"128": "images/icon-128.png"
homepage_url },
"side_panel": {
incognito "default_path": "sidepanel.html"
},
"permissions": ["sidePanel"]
}
Manifest keys
"manifest_version"
An integer specifying the version of the manifest le format that your extension uses. The only supported value is
3.
"name"
A string that identi es the extension in the Chrome Web Store , the install dialog, and the user's Chrome
Extensions page ( chrome://extensions ). The maximum length is 75 characters. For information on using locale-
speci c names, see Internationalization.
"version"
A string that identi es the extension's version number. For information on version number forma ing, see Version.
"description"
A string that describes the extension on both the Chrome Web Store and the user's extension management page.
The maximum length is 132 characters. For information on localizing descriptions, see Internationalization.
"icons"
One or more icons that represent your extension. For information about best practices, see Icons.
Optional keys
"action"
De nes the appearance and behavior of the extension's icon in the Google Toolbar. For more information, see
chrome.action .
"author"
Speci es the email address of the account that was used to create the extension.
"background"
Speci es the JavaScript le containing the extension's service worker, which acts as an event handler. For more
information, see About extension service workers.
"chrome_settings_overrides"
De nes overrides for selected Chrome se ings. For more information, see Overriding Chrome se ings.
"chrome_url_overrides"
De nes overrides for default Chrome pages. For more information, see Override Chrome pages.
"commands"
De nes keyboard shortcuts within the extension. For more information, see chrome.commands.
"content_scripts"
Speci es JavaScript or CSS les to be used when the user opens certain web pages. For more information, see
Content scripts.
"content_security_policy"
De nes restrictions on the scripts, styles, and other resources an extension can use. For more information, see
Content security policy.
"cross_origin_embedder_policy"
Speci es a value for the Cross-Origin-Embedder-Policy HTTP header, which con gures embedding of cross-
origin resources in an extension page.
"cross_origin_opener_policy"
Speci es a value for the Cross-Origin-Opener-Policy HTTP header, which lets you ensure that a top-level
extension page doesn't share a browsing context group with cross-origin documents.
"declarative_net_request"
De nes static rules for the declarativeNetRequest API, which allows blocking and modifying of network requests.
"default_locale"
A string that de nes the default language of an extension that supports multiple locales. Examples include "en"
and "pt_BR". This key is required in localized extensions, and must not be used in extensions that aren't localized.
For more information, see Internationalization.
"devtools_page"
"export"
Allows resources to be exported from the extension. For more information, see Export.
"externally_connectable"
Speci es what other pages and extensions can connect to your extensions. For more information, see
"externally_connectable" .
"homepage_url"
A string specifying a URL for the extension's homepage. If this is unde ned, the homepage defaults to the
extension's Chrome Web Store page. This eld is particularly useful if you host the extension on your own site.
"host_permissions"
Lists the web pages your extension is allowed to interact with, de ned using URL match pa erns. User permission
for these sites is requested at install time. For more information, see Host permissions.
"import"
Allows resources to be imported into the extension. For more information, see Import.
"incognito"
De nes how the extension behaves in incognito mode. Supported values are "spanning" , "split" , and
"not_allowed" . For more information, see Incognito.
"key"
Speci es your extension's ID for various development use cases. For more information, see Key.
"minimum_chrome_version"
De nes the oldest Chrome version that can install your extension. The value must be a substring of an existing
Chrome browser version string, such as "107" or "107.0.5304.87" . Users with versions of Chrome older than
the minimum version see a "Not compatible" warning in the Chrome Web Store, and are unable to install your
extension. If you add this to an existing extension, users whose Chrome version is older won't receive automatic
updates to your extension. This includes business users in ephemeral mode.
"oauth2"
Allows the use of an OAuth 2.0 security ID. The value of this key must be an object with "client_id" and
"scopes" properties. For details, see the OAuth 2.0 tutorial.
"omnibox"
Allows the extension to register a keyword in Chrome's address bar. For more information, see Omnibox.
"optional_host_permissions"
"optional_permissions"
"options_page"
Speci es a path to an options.html le for the extension to use as an options page. For more information, see Give
users options.
"options_ui"
Speci es a path to an HTML le that lets a user change extension options from the Chrome Extensions page. For
more information, see Embedded options.
"permissions"
Enables use of particular extension APIs. See Permissions for a general explanation. Reference pages for individual
APIs list the permissions they require.
"requirements"
Lists technologies required to use the extension. For a list of supported requirements, see Requirements.
"sandbox"
De nes a set of extension pages that don't have access to extension APIs or direct access to non-sandboxed
pages. For more information, see Sandbox.
"short_name"
A string containing a shortened version of the extension's name to be used when character space is limited. The
maximum length is 12 characters. If this is unde ned, a truncated version of the "name" key displays instead.
"side_panel"
"storage"
Declares a JSON schema for the managed storage area. For more information, see Manifest for storage areas.
"tts_engine"
Registers the extension as a text to speech engine. For more information, see the sEngine API.
"update_url"
A string containing the URL of the extension's updates page. Use this key if you're hosting your extension outside
the Chrome Web Store.
"version_name"
A string describing the extension's version. Examples include "1.0 beta" and "build rc2" . If this is
unspeci ed, the "version" value displays on the extension management page instead.
"web_accessible_resources"
De nes les within the extension that can be accessed by web pages or other extensions. For more information,
see Web Accessible Resources.
"file_browser_handlers"
Provides access to the fileBrowserHandler API, which lets extensions access the ChromeOS le browser.
"file_handlers"
Speci es le types for ChromeOS extensions to handle. For more information, see file_handlers .
"file_system_provider_capabilities"
Allows access to the fileSystemProvider API, which lets extensions create le systems that ChromeOS can
use.
"input_components"
Allows the use of the Input Method Editor API. For more information, see input_components .
Except as otherwise noted, the content of this page is licensed under the Creative Commons A ribution 4.0 License, and code samples are licensed under the
Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its a liates.