Submit an extension

↑↓ move · ↵ open · Tab filter · Esc close

How-to guide

How to Create a Chrome Extension: Beginner Tutorial (Manifest V3)

How-to

How to Create a Chrome Extension: Beginner Tutorial (Manifest V3)

On this page
  1. The short answer
  2. How do I make a Chrome extension?
  3. What you need before you start
  4. Chrome extension file structure: what manifest.json needs
  5. How to build a hello-world Chrome extension step by step
  6. How to add a background service worker
  7. How to inject a content script into web pages
  8. How to test and debug your extension locally
  9. How to publish your Chrome extension to the Chrome Web Store
  10. Examples of well-scoped extensions to learn from
  11. Frequently asked

The short answer

Create a folder with a manifest.json file declaring Manifest V3, a name, and a version; add a popup.html or background service worker for logic; then load it unpacked from chrome://extensions with Developer mode on. Test locally, then package and submit it through the Chrome Web Store Developer Dashboard when ready to publish.

How do I make a Chrome extension?

Every Chrome extension starts with the same file: manifest.json, which tells Chrome the extension's name, version, and what it's allowed to do. Everything else — a popup, a background script, a content script — is optional depending on what your extension needs to do.

You write extensions with the same HTML, CSS, and JavaScript used for any website, plus Chrome's own extension APIs for things a normal webpage can't do, like reading the active tab or storing data in the browser. No separate framework or build tool is required to get started.

Design for one job, not ten

Chrome's own developer guidance is explicit: choose a single, narrowly defined purpose for your extension and make it easy to understand. A tool that does one thing well is also the easiest kind to get through Chrome Web Store review.

What you need before you start

The setup is lighter than most people expect — there's no SDK to install and no account required until you're ready to publish.

  • A code or text editor — VS Code is a common choice, but any plain-text editor works.
  • Chrome itself, with Developer mode enabled on the chrome://extensions page.
  • Basic HTML, CSS, and JavaScript — enough to write a small popup page and a script file.
  • A Chrome Web Store Developer Dashboard account, only needed at the publishing stage, not for building or testing locally.

Chrome extension file structure: what manifest.json needs

manifest.json is the only file Chrome requires by name and location — it has to sit in your extension's root folder.

{
  "manifest_version": 3,
  "name": "Hello World",
  "version": "1.0",
  "description": "A minimal example extension.",
  "action": {
    "default_popup": "popup.html"
  },
  "permissions": []
}
Key manifest.json fields
FieldWhat it does
manifest_versionMust be 3 for any new extension — Manifest V2 is retired on the Chrome Web Store
name / version / descriptionBasic metadata shown on the extension's Chrome Web Store listing
actionDefines the toolbar icon's behavior, including a default_popup HTML file
backgroundRegisters a service worker that runs in the background, without direct DOM access
content_scriptsDeclares JavaScript files to run inside the pages a user visits
permissionsLists which Chrome APIs the extension can call, shown to users before install

How to build a hello-world Chrome extension step by step

  1. Create a new folder for your extension and add a manifest.json file with the fields above.
  2. Create popup.html in the same folder with a simple heading, like <h1>Hello World</h1>.
  3. Open chrome://extensions in Chrome and turn on Developer mode using the toggle in the top-right corner.
  4. Click Load unpacked and select your extension's folder.
  5. Click your extension's new icon in the toolbar to see the popup appear.

That's a complete, working extension. Everything from here — a background service worker, a content script, permissions — is added on top of this same structure.

How to add a background service worker

A service worker runs in the background and reacts to browser events, like a tab closing, without needing a visible popup or webpage open.

{
  "background": {
    "service_worker": "background.js"
  }
}
chrome.tabs.onRemoved.addListener((tabId) => {
  console.log("Tab closed:", tabId);
});

Add that background field to your manifest.json alongside action, create background.js in the same folder, then reload the extension from chrome://extensions to activate it. Service workers don't have direct access to a page's DOM — for that, you need a content script.

How to inject a content script into web pages

A content script runs inside the actual pages a user visits, which is how an extension reads or changes what's on screen.

{
  "content_scripts": [
    {
      "matches": ["<all_urls>"],
      "js": ["content.js"]
    }
  ]
}
document.body.style.border = "5px solid red";

Save that as content.js, add the content_scripts field to manifest.json, then reload the extension and refresh any open tab — every page now loads with a red border, confirming the script ran. Narrow the matches pattern to specific sites once you move past testing, rather than leaving <all_urls> in a published extension.

How to test and debug your extension locally

Everything happens inside chrome://extensions while you're developing, with no separate test environment to set up.

  1. Click the reload icon on your extension's card in chrome://extensions after any code change.
  2. Right-click the toolbar icon and choose Inspect popup to open DevTools scoped to the popup specifically.
  3. Click service worker on the extension's card to open a console scoped to your background script.
  4. Use the regular browser DevTools on any tab to debug a content script, since it runs inside that page's context.
  5. Watch the Errors button on the extension's card — Chrome surfaces manifest and permission problems there before they show up as silent failures.

How to publish your Chrome extension to the Chrome Web Store

Publishing means packaging your folder and submitting it through Google's separate developer dashboard, not something you do from inside Chrome itself.

  1. Create a Chrome Web Store Developer Dashboard account and complete the one-time registration step, including its account fee, listed on the dashboard itself.
  2. Zip your extension's folder, or let the dashboard package it, and upload it as a new item.
  3. Fill in the store listing: name, description, screenshots, and a category.
  4. Review the developer program policies before submitting, since a violation is the most common reason a listing gets rejected.
  5. Submit for review; Chrome's team checks the extension before it becomes publicly visible in search.

All logic has to ship in the package

Chrome's policy is explicit: an extension can't download and run additional JavaScript at runtime. Any code your extension executes needs to be included in the package you upload, not fetched from an external server after install.

Examples of well-scoped extensions to learn from

Before you design your own extension, it helps to look at real ones that do exactly one job — the same principle Chrome's own guidance recommends for anyone submitting to the Web Store. Browse Manifest V3-ready extensions for more current examples.

Single-purpose extensions worth studying

Study one of these by opening its options page and thinking through what a minimal manifest and script structure for it would look like — that's a faster way to learn the patterns than starting from a blank folder. See Find Extensions for developers for more building and publishing resources.

Extensions mentioned in this guide

Frequently asked

Can I create my own Chrome extension without coding experience?

A hello-world extension needs only a few lines of HTML and JSON, which is approachable without prior experience, but anything beyond a static popup requires basic JavaScript to handle logic and browser events.

Is making a Chrome extension hard?

A basic extension with a popup or simple content script is one of the easier things to build with web skills, since it reuses HTML, CSS, and JavaScript. Complexity grows once you add background logic, permissions, and Chrome Web Store review requirements.

How do I create my own extension icon?

Add an icons field to manifest.json pointing to image files at the standard sizes Chrome requests, commonly 16px, 48px, and 128px, and reference them from the action field for the toolbar icon.

Can ChatGPT make a Chrome extension?

An AI chat tool can generate a starting manifest.json and script files for a simple extension, but you still need to create the folder, load it unpacked in Chrome, and test it yourself, since the tool can't do that part for you.

Do I need to pay to publish a Chrome extension?

There's a one-time developer registration step on the Chrome Web Store Developer Dashboard that includes an account fee; check the current dashboard for the exact amount, since fees and terms can change.

What's the difference between Manifest V2 and Manifest V3?

Manifest V3 is the current required format for new Chrome extensions and replaces V2's background pages with service workers, among other API changes; V2 extensions are no longer accepted for new Chrome Web Store submissions.

Can I test a Chrome extension without publishing it?

Yes. Enable Developer mode on chrome://extensions, click Load unpacked, and select your extension's folder to run and test it locally without any Chrome Web Store account.

How long does Chrome Web Store review take?

Review time isn't fixed and varies by submission, so check your Developer Dashboard's status page for the current state of your listing rather than assuming a set number of days.

Can I build a Chrome extension using Python?

No. Chrome extensions run on HTML, CSS, and JavaScript inside the browser; Python isn't a supported runtime for extension code, though you could use it for unrelated build or automation scripts outside the extension itself.

Do Chrome extensions work on Android?

No. Chrome for Android doesn't support extensions, so anything you build only runs in desktop Chrome and other Chromium-based desktop browsers.

Where can I find a Chrome extension template to start from?

Chrome for Developers' own get-started documentation walks through a hello-world extension and several follow-up tutorials, including a popup-based tab manager and a content-script example, as a starting template.

Can I update a Chrome extension after it's published?

Yes. Increase the version number in manifest.json, upload the new package through the Developer Dashboard, and submit it for review; Chrome then rolls the update out to existing users automatically.

Sources

  1. Chrome for Developers: Extensions / Get started