
6 min read
From the studio
We build apps people actually keep.Tinkrd is a small indie studio making focused, high-quality apps for everyday life. See what we're working on.
View our appsChrome extensions are built with HTML, CSS, and JavaScript. That is it. If you have ever built a basic webpage, you already know the core languages. The interesting part is how those languages are wired together inside Chrome’s extension system.
The languages used for Chrome extensions
Chrome extensions use three web languages: HTML for structure, CSS for styling, and JavaScript for all the logic. Chrome does not support any other language natively. If you want to use TypeScript, Rust, or another language, you compile it down to JavaScript first. At runtime, Chrome only reads plain JavaScript.
This is actually good news for most developers. You do not need to install a new runtime or learn a completely foreign syntax. The main thing to learn is Chrome’s own extension API, which is a set of JavaScript objects and methods Chrome exposes to your code.
How JavaScript, HTML, and CSS each play a role
Each language has a specific job inside a Chrome extension, and they do not all run in the same place.
JavaScript: the workhorse
JavaScript handles everything functional. It reads page content, communicates with Chrome’s APIs, sends network requests, stores data, and responds to user actions. Most of your code lives here. Chrome extensions run JavaScript in several isolated contexts: a background service worker, content scripts that run on web pages, and scripts tied to your popup or options page.
HTML: your UI scaffolding
HTML builds the visible parts of an extension, mainly the popup that appears when someone clicks your extension icon, and the options page if you have one. These are ordinary HTML files, linked to CSS and JavaScript just like a normal webpage.
CSS: styling the popup and options page
CSS styles your popup and options page. Content scripts can also inject CSS directly into a webpage the user is visiting, which lets you change how a site looks. That part requires some care so you do not accidentally override the page’s own styles.
The manifest.json file: the glue that holds it together
Every Chrome extension has a manifest.json file. This file is not JavaScript, HTML, or CSS. It is a JSON configuration file that tells Chrome what your extension is, what permissions it needs, and which files run where.
Here is a minimal Manifest V3 example:
{
"manifest_version": 3,
"name": "My Extension",
"version": "1.0",
"permissions": ["storage", "activeTab"],
"background": {
"service_worker": "background.js"
},
"action": {
"default_popup": "popup.html",
"default_icon": "icon.png"
},
"content_scripts": [
{
"matches": [""],
"js": ["content.js"]
}
]
}
Chrome reads this file first. Everything else, your JavaScript, your HTML popup, your content scripts, is referenced from here. Getting this file right is often where first-time extension developers get stuck. The official Chrome extension manifest reference is the most reliable place to check what each field does.
For a broader look at the full process, our guide to Chrome extension development covers scope, architecture, and what the work actually involves from start to finish.
Can you use TypeScript or a framework like React?
Yes, but you have to compile them first. TypeScript is popular for extensions because it catches type errors before they reach users. React, Vue, and Svelte are all usable for the popup and options page UI, since those are just HTML pages at heart.
Here is a quick look at common stack options and the trade-offs:
| Approach | Languages involved | Build step needed | Good for |
|---|---|---|---|
| Vanilla JS | HTML, CSS, JavaScript | No | Simple extensions, fast prototypes |
| TypeScript | TypeScript compiled to JS | Yes (tsc or bundler) | Larger codebases, team projects |
| React + TypeScript | TSX compiled to JS | Yes (Vite or Webpack) | Complex popups or options pages |
| Svelte | Svelte compiled to JS | Yes (Vite) | Small bundle size, reactive UI |
At Tinkrd, we lean toward keeping things simple unless there is a real reason to add complexity. For a first extension, vanilla JavaScript with a build tool like Vite is often enough to ship something real without fighting your toolchain.
If you are figuring out whether to tackle this yourself or bring someone in, can I build my own Chrome extension walks through an honest assessment of what skills you actually need.
What the content script context means for your JavaScript
This trips up a lot of new extension developers. JavaScript in a content script runs on the web page the user is visiting, but it is isolated from the page’s own JavaScript. Your content script cannot call functions defined in the page, and the page cannot call yours.
If you need your content script to talk to your background service worker, you use Chrome’s message passing system:
// content.js: send a message to the background
chrome.runtime.sendMessage({ action: 'getData' }, (response) => {
console.log(response.data);
});
// background.js: listen for messages
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
if (message.action === 'getData') {
sendResponse({ data: 'here is your data' });
}
});
This architecture keeps your code secure and predictable, but it does mean you need to think about which context each piece of logic belongs in before you start writing.
The Chrome messaging documentation covers all the patterns, including one-time messages, long-lived connections, and cross-extension messaging.
Frequently asked questions
Do I need to know a backend language to build a Chrome extension?
No. A Chrome extension runs entirely in the browser using JavaScript. If your extension needs to talk to a server, you would write that server in whatever backend language you prefer, but the extension itself is pure frontend code.
Can I build a Chrome extension with Python?
Not directly. Chrome does not run Python. You could use a tool like Brython or Pyodide to run Python in a browser context, but it is a heavy, awkward approach. For extensions, learning enough JavaScript to do the job is the faster path by a wide margin.
What is Manifest V3 and does it change the languages used?
Manifest V3 is the current version of Chrome’s extension platform. It changed some architecture rules, mostly replacing persistent background pages with service workers and tightening permissions. The languages are still HTML, CSS, and JavaScript. Only the way you structure and configure certain parts changed.
Is JavaScript knowledge enough to publish an extension to the Chrome Web Store?
Yes, for most extensions. You will also need a basic understanding of JSON to write your manifest file, and some familiarity with Chrome’s extension API. The Chrome Web Store review process is mostly about policy compliance and security, not the sophistication of your code.
How long does it take to learn the Chrome extension APIs if I already know JavaScript?
Most developers can build and ship a working extension within a few days of focused learning if they already know JavaScript. The core APIs, storage, tabs, messaging, and runtime, are well-documented and follow consistent patterns. The steeper part is usually debugging across multiple isolated contexts, not the language itself.
Chrome extensions live at the intersection of web development and browser internals, but the core answer is simple: HTML, CSS, and JavaScript. If you know those languages, the main learning curve is Chrome’s API surface, not a new programming language entirely.
We’re building in the open
Tinkrd is a small studio making thoughtful apps for families. Our first app is launching soon.