Get Started

Build your first Chrome extension

Highlight anything on the web, right-click, and it's saved to your own notes, ready to copy as Markdown. Build it from scratch in plain JavaScript, with real Manifest V3 code and no build tools, for Chrome and Edge. Then grow it into a page summariser that runs on a free local AI.

102 minIntermediateTools: Free. Publishing to the Chrome Web Store is optional and costs a one-off US$5 registration fee. Microsoft Edge Add-ons is free.Step 1 free
A working extension of your owna reading-time popup, highlight-to-save notes, a right-click menu and a badge counting your notes
How the four parts of every modern extension fit togethermanifest, popup, content script and service worker
The debugging routine that fixes most extension problems in minutes, plus what changes need a reload
  • A clear picture of permissions, privacy and what publishing to the Chrome Web Store involves, before you spend anything
  • A ready-made prompt to grow it into a "summarise this page" extension powered by a free AI on your own PC
Before you start
  • Google Chrome or Microsoft Edge, up to date. Both use the same extension system, so everything here works in either.
  • A code editor. Any will do; VS Code ↗ is free and highlights mistakes in JSON and JavaScript.
  • Basic comfort with files and folders in the terminal. If mkdir and cd are new, do the Terminal survival kit first.
  • No accounts, no Node.js, no build tools. An extension is just a folder of HTML, CSS and JavaScript.
  • Optional, only if you publish: a Google account and the Chrome Web Store's one-off US$5 developer fee (shown on Chrome for Developers ↗; fees can change, so check there).
01/07Make the folder, write a manifest, load it into Chrome0 done
STEP 01 of 07~12 min

Make the folder, write a manifest, load it into Chrome

Every extension starts with manifest.json: a small file that tells the browser what the extension is called, what's in it and what it's allowed to do.

  1. See the finished thing first (2 minutes)Download the starter kit, read-and-keep.zip, and unzip it. Go to chrome://extensions (type it into the address bar), turn on Developer mode at the top right, click Load unpacked and choose the unzipped read-and-keep folder. Highlight a sentence on any article, right-click it and choose Save "..." to notes, then pin the extension from the puzzle-piece menu and open its popup: your note is there, and the badge on the icon counts it. That's what you're about to build. Click Remove on its card before you load your own, or you'll get two right-click items.

  2. Now build it yourself. Make a folder for the project with an icons folder inside it:

    Windows
    mkdir "$HOME\Documents\read-and-keep\icons"
    cd "$HOME\Documents\read-and-keep"
    Mac / Linux
    mkdir -p ~/Documents/read-and-keep/icons
    cd ~/Documents/read-and-keep
  3. Copy the four PNGs from the kit's icons folder into your own icons folder. Keep the rest of the kit to check your work against. You'll type the code yourself, one piece at a time, so you know what every line does.

  4. Now create manifest.json in the read-and-keep folder:

    manifest.json
    {
      "manifest_version": 3,
      "name": "Read & Keep",
      "version": "0.1.0",
      "description": "See how long a page takes to read, and save the bits you highlight as notes. Everything stays in your browser.",
      "icons": {
        "16": "icons/icon16.png",
        "32": "icons/icon32.png",
        "48": "icons/icon48.png",
        "128": "icons/icon128.png"
      },
      "action": {
        "default_title": "Read & Keep",
        "default_popup": "popup.html",
        "default_icon": {
          "16": "icons/icon16.png",
          "32": "icons/icon32.png"
        }
      }
    }
    • manifest_version: 3 is the current extension format (Manifest V3). The only value Chrome accepts now is 3.
    • name (75 characters max) and description (132 max) show on the extensions page and in the store.
    • icons are for the extensions page and the store. action is the button in your toolbar: its icon, its hover text and the page that opens when you click it (the popup).
  5. Create popup.html next to it. This is a throwaway hello page; you'll replace it in step 3:

    popup.html
    <!doctype html>
    <html lang="en">
      <head>
        <meta charset="utf-8" />
        <title>Read &amp; Keep</title>
      </head>
      <body style="width: 240px; font: 14px system-ui, sans-serif">
        <p>Hello. My first extension works.</p>
      </body>
    </html>
  6. Now load it. In Chrome, go to chrome://extensions (type it into the address bar; it isn't a clickable link). Turn on Developer mode in the top-right corner, click Load unpacked and choose your read-and-keep folder. In Edge, the same page is edge://extensions, with the same Developer mode toggle and Load unpacked button.

  7. Click the puzzle-piece Extensions button in the toolbar and pin Read & Keep, so its icon sits next to the address bar. Then click the icon.

    Tip"Unpacked" means Chrome runs the extension straight from your folder. Edit a file, reload, and the change is live. It's how every extension is developed before it's ever published.
✓
CheckpointRead & Keep appears on chrome://extensions with its orange icon, and clicking the toolbar icon opens a small box saying Hello. My first extension works.
If it breaks'Manifest file is missing or unreadable' + 3 more
'Manifest file is missing or unreadable'
You picked the wrong folder. Choose the folder that has manifest.json directly inside it, not the folder above it. Also check the file isn't secretly called manifest.json.txt: in Windows Notepad, set Save as type to All files, or turn on file name extensions in File Explorer's View menu.
'Manifest is not valid JSON'
Usually a missing or extra comma, or curly quotes pasted from a document. JSON wants straight double quotes and no comma after the last item in a list. The error tells you the line and column.
'Could not load icon'
The icon file isn't where the manifest says. Check the icons folder sits inside read-and-keep and holds icon16.png, icon32.png, icon48.png and icon128.png.
There's no Load unpacked button
Developer mode is off. It's the toggle in the top-right corner of the extensions page. On a work or school computer, an administrator may have blocked it; use your own PC.
Still stuck? Ask the community
Next mission · Build things with codeDocker without fear: run any self-hosted app in a container
→