How to Build Chromium From Source - Chromium
You need to clone the Chromium repository, install dependencies, and run the build system to build chromium from source successfully.
Chromium is the open-source browser engine created in 2008 that powers Chrome and many other browsers. Building from source lets developers customize the browser, audit code, and create developer builds for testing. The process requires time, disk space, and patience—but it's achievable on Windows, macOS, and Linux.
Prerequisites and Setup
Before you start, ensure your system has at least 30GB free space and Git installed. Chromium's source code is large. Visit the official Chromium documentation to download `depot_tools`, which contains essential build scripts. Add depot_tools to your system PATH.
Open your terminal or command prompt and verify the installation by typing `gclient` and pressing Enter.
Cloning and Building
Create a working directory for your project. Run `fetch chromium` to clone the Chromium repository and download the source code. This step takes significant time—often 30 minutes to several hours depending on your internet speed. Once complete, navigate into the `src` directory.
Next, run `gclient runhooks` to install platform-specific dependencies. For compiling chromium on Linux, you may need additional libraries; macOS requires Xcode Command Line Tools; Windows needs Visual Studio. Configure your custom build with `gn args out/Default`, where you can enable or disable features. For a basic developer build, default settings work fine.
Finally, execute `ninja -C out/Default chrome` to compile the browser. Building browser code takes 20-60 minutes depending on your CPU cores. The compiled executable appears in `out/Default/chrome`.
Next Steps
Test your custom build immediately after compilation finishes. Regular development setups benefit from incremental builds using the same ninja command—only modified code recompiles, saving time on future iterations.
Related Articles
- best lightweight chromium browser alternative
- chromium not working on windows 10
- how to install chromium browser windows
- top open source chromium based browsers
- how to enable hardware acceleration chromium
- how to clear cache in chromium automatically
- how to use chromium as default browser
- best chromium browser for developers