# How Brave Implements Chrome Extension Compatibility: A Technical Deep Dive

> Discover how Brave achieves Chrome extension compatibility. Learn about its Chromium inheritance, compatibility layer, and privacy enforcement.

- Repository: [Brave Software/brave-browser](https://github.com/brave/brave-browser)
- Tags: deep-dive
- Published: 2026-02-16

---

**Brave achieves seamless Chrome extension compatibility by inheriting Chromium's untouched extension framework while injecting a thin compatibility layer for URL mapping, Brave-specific APIs, and privacy policy enforcement.**

Brave Browser is built on the Chromium codebase, which provides native support for the Chrome extension ecosystem. This architectural foundation allows Brave to maintain full **Chrome extension compatibility** while implementing Brave-specific privacy features through strategic overrides in the brave-core repository.

## Inheriting Chromium's Extension Architecture

### Core Extension Services

Brave utilizes Chromium's native extension infrastructure without modification. The **ExtensionService** handles loading, updating, and unloading extensions through the same code paths used by Google Chrome. In `chrome/browser/extensions/extension_service.cc`, the `ExtensionService::AddExtension` method validates manifests and registers extensions with the **ExtensionRegistry**, which tracks installed extension states in `chrome/browser/extensions/extension_registry.cc`.

### Extension System Initialization

The entry point `ExtensionSystemImpl::CreateExtensionService` in `chrome/browser/extensions/extension_system_impl.cc` wires the extension service into the browser process during startup. This ensures that all standard Chrome extension APIs are registered before any extensions load.

## The Brave Compatibility Layer

### URL Mapping and API Extensions

Brave implements a compatibility layer that maps Chrome-style URLs (`chrome://`) to Brave equivalents (`brave://`). This layer also exposes **Brave-only APIs** such as `chrome.braveWallet` and `chrome.ipfs` while maintaining standard Chrome API availability. The Brave Wallet API implementation in `chrome/browser/extensions/api/brave_wallet/brave_wallet_api.cc` demonstrates this pattern:

```cpp
// chrome/browser/extensions/api/brave_wallet/brave_wallet_api.cc
#include "chrome/common/extensions/api/brave_wallet.h"

namespace extensions {

class BraveWalletGetBalanceFunction : public ExtensionFunction {
 public:
  BraveWalletGetBalanceFunction() = default;

  // Called from JS: chrome.braveWallet.getBalance(...)
  ResponseAction Run() override {
    // Perform Brave‑specific logic, then reply to the caller.
    std::string balance = GetBalanceFromWallet();
    return RespondNow(ArgumentList(
        api::brave_wallet::GetBalance::Results::Create(balance)));
  }
};

}  // namespace extensions

```

### Privacy Policy Enforcement

Brave enforces privacy policies through extension-policy hooks that filter network requests. The **ExtensionNavigationThrottle** inspects every outgoing request from extensions, applying Brave's **Shields** blocklists and IPFS permission rules. In `extensions/common/permissions/permissions_data.cc`, the `ExtensionPermissionsData` class implements additional permission checks that respect Brave's privacy settings while maintaining Chrome extension compatibility.

## Chrome Extension Import Mechanism

Brave provides a seamless migration path for users switching from Chrome. The **ExtensionImporter** class in `chrome/browser/extensions/extension_importer.cc` reads Chrome's extension manifests, resources, and storage (IndexedDB, local storage) and copies them into Brave's profile format:

```cpp
// chrome/browser/extensions/extension_importer.cc
bool ExtensionImporter::ImportChromeExtension(const base::FilePath& chrome_profile,
                                            const std::string& extension_id) {
  // 1. Read Chrome’s extension manifest from the source profile.
  // 2. Copy the extension directory to Brave’s profile under
  //    "Extensions/<extension_id>".
  // 3. Import IndexedDB and Local Storage if present.
  // 4. Register the extension with ExtensionService.
  return extension_service_->AddExtension(
      extension_path, mojom::ManifestLocation::kExternalPref);
}

```

This import logic supports both **Manifest V2 and V3** extensions and preserves existing extension data, ensuring Chrome extension compatibility during migration.

## Key Implementation Files

The following files in the brave-core repository define Brave's extension compatibility layer:

- [`chrome/browser/extensions/extension_service.cc`](https://github.com/brave/brave-core/blob/master/chrome/browser/extensions/extension_service.cc) – Core loading/unloading with Brave-specific feature flags
- [`chrome/browser/extensions/extension_registry.cc`](https://github.com/brave/brave-core/blob/master/chrome/browser/extensions/extension_registry.cc) – Extension state tracking
- [`chrome/browser/extensions/extension_system_impl.cc`](https://github.com/brave/brave-core/blob/master/chrome/browser/extensions/extension_system_impl.cc) – Browser process integration
- [`extensions/common/permissions/permissions_data.cc`](https://github.com/brave/brave-core/blob/master/extensions/common/permissions/permissions_data.cc) – Permission checks with Brave privacy rules
- [`chrome/browser/extensions/api/brave_wallet/brave_wallet_api.cc`](https://github.com/brave/brave-core/blob/master/chrome/browser/extensions/api/brave_wallet/brave_wallet_api.cc) – Brave-specific API implementation
- [`chrome/browser/extensions/extension_importer.cc`](https://github.com/brave/brave-core/blob/master/chrome/browser/extensions/extension_importer.cc) – Chrome-to-Brave extension migration
- [`chrome/browser/extensions/api/ipfs/ipfs_api.cc`](https://github.com/brave/brave-core/blob/master/chrome/browser/extensions/api/ipfs/ipfs_api.cc) – IPFS API exposure
- [`chrome/browser/ui/webui/extensions/extension_settings_ui.cc`](https://github.com/brave/brave-core/blob/master/chrome/browser/ui/webui/extensions/extension_settings_ui.cc) – Extension management UI

## Summary

- Brave maintains **Chrome extension compatibility** by building directly on Chromium's unchanged extension framework, including `ExtensionService`, `ExtensionRegistry`, and `ExtensionSystemImpl`.
- A **thin compatibility layer** maps `chrome://` URLs to `brave://` equivalents and injects Brave-specific APIs like `chrome.braveWallet` and `chrome.ipfs`.
- **Privacy enforcement** occurs through `ExtensionNavigationThrottle` and `ExtensionPermissionsData`, which apply Brave Shields and IPFS rules to extension network requests.
- The **`ExtensionImporter`** class enables seamless migration from Chrome by reading Chrome's extension storage formats and copying them to Brave's profile directory.
- All extension-related code resides in the **brave-core** repository under `chrome/browser/extensions/`, which brave-browser pulls in as a sub-project.

## Frequently Asked Questions

### Can I install Chrome extensions directly in Brave?

Yes. Because Brave implements full **Chrome extension compatibility** through Chromium's native framework, you can install extensions directly from the Chrome Web Store or load unpacked extensions. Brave's `ExtensionService` in `chrome/browser/extensions/extension_service.cc` handles the same manifest validation and loading logic as Chrome, supporting both Manifest V2 and V3 extensions.

### How does Brave handle extension permissions differently from Chrome?

Brave extends Chromium's permission system through `ExtensionPermissionsData` in `extensions/common/permissions/permissions_data.cc`. While standard Chrome permissions are granted as requested, Brave applies additional privacy filters. For example, the `ExtensionNavigationThrottle` checks every network request from extensions against Brave's Shields blocklists, potentially blocking requests that Chrome would allow, ensuring extensions respect Brave's privacy-first policies.

### What happens to my Chrome extension data when I import to Brave?

The `ExtensionImporter` class in `chrome/browser/extensions/extension_importer.cc` preserves your data by reading Chrome's proprietary storage formats, including IndexedDB, Local Storage, and the `Preferences` file. It copies these into Brave's profile directory under `Extensions/<extension_id>/`, ensuring that both Manifest V2 and V3 extensions retain their settings and stored data after migration, maintaining seamless Chrome extension compatibility.

### Does Brave support Manifest V3 extensions?

Yes. Brave's extension framework in `chrome/browser/extensions/` supports both Manifest V2 and V3 extensions because it inherits Chromium's complete extension system. The `ExtensionService` validates manifests according to the version specified in the extension's manifest.json, and Brave-specific policies in `ExtensionPermissionsData` apply regardless of manifest version, ensuring consistent Chrome extension compatibility across extension formats.