What Chromedriver is and why you need it
Chromedriver is a tool that lets your code control Google Chrome automatically. If you are writing tests for a web application or building a script that needs to open a browser and interact with websites, Chromedriver acts as the bridge between your code and Chrome itself. Without it, testing frameworks like Selenium cannot talk to Chrome.
Chromedriver runs on Windows, Mac, and Linux. The download is free and takes just a few minutes. The key thing to know upfront: your Chromedriver version must match your Chrome version, or it will not work. If you have Chrome 120 installed, you need Chromedriver 120.
Key Takeaways
- Chromedriver version must match your Chrome version exactly, so check your Chrome version first by typing chrome://version in the address bar.
- Download Chromedriver from Google's official site at chromedriver.chromium.org, not from third-party sources.
- After downloading, extract the file and move the chromedriver executable to a folder your code can find, or add that folder to your system PATH.
- Test your installation by running a simple Selenium script that opens Chrome — if the browser launches, Chromedriver is working.
Check your Chrome version first
Open Google Chrome and type chrome://version in the address bar, then press Enter. The first line shows your Chrome version number — for example, "Version 120.0.6099.129". Write down the first number only (120 in this example).
If you do not know your Chrome version and cannot find it this way, you can also go to the three-dot menu in the top right, click "Help," then "About Google Chrome." Chrome will show you the version and automatically check for updates.
Download Chromedriver from the official source
Go to chromedriver.chromium.org in your browser. You will see a list of versions. Find the one that matches your Chrome version — if you have Chrome 120, download the Chromedriver 120 link.
Click the download link for your operating system. Windows users will see a .zip file, Mac users will see a .zip file, and Linux users will see a .zip file. All three are compressed archives. Save the file to a folder you can find easily, like your Downloads folder or your project folder.
Do not download Chromedriver from any other website. Only use the official Chromium project site to avoid outdated or modified versions.
Extract the Chromedriver file
After the download finishes, you need to extract the compressed file. On Windows, right-click the .zip file, select "Extract All," and choose where to put it. On Mac, double-click the .zip file and it extracts automatically. On Linux, open a terminal in the folder where you downloaded it and run unzip chromedriver-linux64.zip (the filename may vary slightly).
After extraction, you will have a file called chromedriver (on Mac and Linux) or chromedriver.exe (on Windows). This is the executable your code will use. Keep track of where this file is — you will need the full path in the next step.
Make Chromedriver accessible to your code
Your code needs to know where to find Chromedriver. You have two options: tell your code the exact path to the file, or add Chromedriver to your system PATH so your code can find it anywhere.
Option 1: Specify the path in your code. In your Selenium script, when you create a Chrome driver object, pass the full path to Chromedriver. In Python, this looks like:
driver = webdriver.Chrome('/Users/yourname/Downloads/chromedriver')
Replace the path with wherever you extracted Chromedriver. On Windows, use backslashes or forward slashes: C:\Users\yourname\Downloads\chromedriver.exe or C:/Users/yourname/Downloads/chromedriver.exe.
Option 2: Add Chromedriver to your system PATH. This is more convenient if you use Chromedriver in multiple projects. On Windows, move the chromedriver.exe file to a folder that is already in your PATH, like C:\Windows\System32, or create a new folder, add Chromedriver to it, and add that folder to your PATH through System Environment Variables. On Mac and Linux, move the chromedriver file to /usr/local/bin by opening a terminal and running:
sudo mv ~/Downloads/chromedriver /usr/local/bin/
After this, your code can simply reference Chromedriver by name without a full path.
Test that Chromedriver works
Write a small test script to confirm everything is set up correctly. In Python with Selenium, create a file called test_chrome.py and paste this code:
from selenium import webdriverdriver = webdriver.Chrome()driver.get('https://www.google.com')print('Chrome opened successfully')driver.quit()
Run the script from your terminal or command prompt. If Chrome opens, loads Google, prints the success message, and closes, Chromedriver is working. If you get an error saying Chromedriver was not found, double-check the path or confirm that Chromedriver is in your PATH.
Common errors: "chromedriver not found" means your code cannot locate the file — verify the path or move Chromedriver to a folder in your PATH. "This version of ChromeDriver only supports Chrome version X" means your Chromedriver version does not match your Chrome version — download the correct version and try again.
Frequently Asked Questions
What if my Chrome version is newer than the available Chromedriver versions?
Chromedriver versions are released alongside Chrome versions. If your Chrome is very new, check chromedriver.chromium.org again in a day or two — the matching Chromedriver usually appears within days of a Chrome release. In the meantime, you can downgrade Chrome to match an available Chromedriver version, or wait for the matching version to be published.
Can I use the same Chromedriver for multiple projects?
Yes. If you add Chromedriver to your system PATH (Option 2 above), every project on your computer can use it without specifying a path. This is the most convenient setup if you work with multiple Selenium projects.
Do I need to install Chromedriver every time Chrome updates?
Yes, when Chrome updates to a new version, you need to download the matching Chromedriver version. Chrome updates frequently, so check your Chrome version before running tests if you have not used Chromedriver in a while. You can replace the old Chromedriver file with the new one in the same location.
What if Chromedriver crashes or hangs when I run my script?
This usually means the versions do not match. Verify your Chrome version again with chrome://version and confirm you have the exact matching Chromedriver. If versions match, try closing all Chrome windows and running the script again. If the problem persists, download Chromedriver fresh from the official site.
Is Chromedriver the same as Chrome itself?
No. Chrome is the browser you use every day. Chromedriver is a separate tool that controls Chrome from your code. You must have Chrome installed on your computer for Chromedriver to work — Chromedriver cannot run without it.