What Is Google Chrome Written In?
Google Chrome is written mostly in C++. The browser process, the Blink rendering engine, the V8 JavaScript engine, the Skia graphics library, and the Mojo layer that lets processes talk to each other are all C++. Rust is now permitted in Chromium, the open source project behind Chrome, for new third-party libraries and for some first-party code. The built-in pages such as the settings screen are HTML and JavaScript. The Android shell is Java and Kotlin, the iOS and macOS shells are Objective-C and Swift, and the build and test scripts are Python.
This page is about the browser. If you want to know which languages Google uses across all of its products, that question is answered in Which coding language is used by Google?.
The languages in Chrome, part by part
| Part of Chrome | Language | What it does |
|---|---|---|
| Browser process | C++ | Owns the window, tabs, network, and storage |
| Blink | C++ | Turns HTML and CSS into a page layout |
| V8 | C++ | Runs JavaScript and WebAssembly |
| Skia | C++ | Draws text, shapes, and images to the screen |
| Mojo | C++ | Passes messages between processes |
| New libraries | Rust, where allowed | Parsers and other code that handles untrusted input |
| Built-in pages | HTML, JavaScript, TypeScript | Settings, history, downloads, and similar screens |
| Android shell | Java, Kotlin | The app around the engine on Android |
| iOS and macOS shells | Objective-C, Swift | The app around the engine on Apple devices |
| Build and tests | Python | Build scripts, test runners, and tooling |
Blink, the rendering engine
Blink is the part that reads HTML and CSS and decides where every element goes on the screen. Google forked it from WebKit, the engine that Apple's Safari still uses. The two engines therefore share an ancestor, and both are written in C++. Blink runs inside the renderer process, one per tab. It is the largest single body of C++ in the browser.
V8, the JavaScript engine
V8 is the engine that runs the JavaScript on every page you open. It parses the code and starts running it in an interpreter. It then compiles the parts that run often into machine code while the page is still running, a technique called just-in-time compilation. That is why V8 was written in C++. A compiler that produces machine code needs direct control over memory, and the engine itself must start in a few milliseconds. V8 is also the engine inside Node.js, so the same C++ runs JavaScript on servers.
Skia, the graphics library
Skia is the 2D graphics library that paints text, shapes, and images into pixels. It is also written in C++. Skia is shared with Android and with Flutter, Google's toolkit for cross-platform applications, so improving Skia improves three products at once. Skia can draw with the CPU or hand the work to the GPU through the GPU process.
The multi-process design and why C++ was chosen
Chrome does not run as one program. The browser process owns the window and the network. Each tab gets its own renderer process, and a separate GPU process talks to the graphics card. Mojo is the C++ layer that passes messages between those processes. A crashing tab therefore ends one process, not the whole browser. A renderer also runs inside a sandbox, which is an operating system restriction that stops it from reading files or opening network connections on its own.
C++ was chosen for three reasons. First, WebKit was already C++, so the fork inherited the language. Second, a browser is measured in milliseconds per frame and megabytes per tab, and C++ gives direct control over both memory and CPU time. Third, when Chrome was started, no other language could meet those limits on Windows, macOS, and Linux at the same time.
Why Rust is now allowed
The cost of C++ is memory safety. The Chromium team has reported that about 70 percent of its serious security bugs are memory safety problems, such as using memory after it has been freed. Rust is a compiled language that prevents that class of bug at compile time, with little or no speed cost. That is why Chromium now permits Rust for new third-party libraries and, in some cases, for first-party code. The first uses are parsers for formats such as fonts and images, because those handle untrusted input from websites.
Why this matters in an interview
Chrome is a useful example when an interviewer asks a design question, because it shows three ideas in one product.
The first is the trade-off between speed and safety. C++ gives the speed a browser needs and costs memory safety. Rust gives both, at the price of being harder to learn and slower to compile. Naming that trade-off is what an interviewer wants to hear.
The second is process isolation as a system design idea. Chrome puts each tab in its own sandboxed process so that one failure or one attack stays contained. The same principle appears in backend design whenever a service is split so that one failing part cannot stop the others.
The third is the answer to a question interviewers sometimes ask directly: what language would you write a browser in? A good answer is C++ or Rust for the engine, with a higher-level language for the user interface around it. The engine needs control over memory and runs untrusted code from the web, which is the reason for that split. Then explain why the engine and the interface are separated into different processes.
The language you use in a Google coding interview is a separate decision. It is covered in Which language is best for Google coding interview? and in What coding language does Google hire?.
How to Prepare
- Learn to name trade-offs in one sentence. For every choice in a design, state what it gains and what it costs, as in "C++ gains speed and costs memory safety".
- Study process isolation as a design pattern. Grokking the System Design Interview covers how to split a system so that one failure stays contained.
- Practice the Google coding round in your strongest language. Grokking the Google Coding Interview works through the patterns Google asks most often.
- Rehearse the browser question out loud. Explain the browser, renderer, and GPU processes in two minutes. Then name the language for each and why.

GET YOUR FREE
Coding Questions Catalog

$98

$197

$72