Migrate to Manifest V3
A guide to converting Manifest V2 extensions to Manifest V3 extensions.
This section helps you upgrade an extension from Manifest V2 to Manifest V3, the newest version of the Chrome Extensions platform. Migration work is broadly divided into the categories below. To help you track your work, we've provided a checklist summarizing the contents of these documents. You can access the content via the checklist, or dive into the content. Both paths end with an upgraded extension.
- Update the manifest—The
manifest.json
must be specific to V3. Changes that can be made on their own are described in this section. Manifest changes related to code are described with the code changes they support. - Migrate to a service worker—A service worker replaces the extension's background or event page to ensure that background code stays off the main thread where it can hurt performance. This change also requires moving DOM, window, and certain extension API calls into offscreen documents.
- Update API calls—Some API calls need to be replaced with more modern equivalents.
- Replace blocking web request listeners—Blocking or modifying network requests in Manifest V2 could significantly degrade performance and require excessive access to sensitive user data. The Declarative Net Request API allows extensions to block or modify web content with fewer permissions and without hindering performance.
- Improve extension security—Manifest V3 improves extension security in several ways. Besides an enhanced content security policy, support is removed for remotely hosted code and execution of arbitrary strings.
New extension features
Since the release of Manifest V3, we've continued to add new features, many of which are usable in both Manifest V2 and Manifest V3. You are not required to use them when converting; however, when they replace older features, you should prefer them to the features they replace and expect that the replaced features will eventually be deprecated and removed.