How To View the Source Code of a Chrome Extension on Windows

Chrome browser is great, but it’s the tons of excellent extensions that make Chrome over other popular browsers on the market. If you are interested in seeing where the magic happens, here is how you can check out the source code of any extensions installed on your Chrome.

Through File Explorer

Behind the scene, the extensions installed in your Chrome browser are nothing but a group of source code files that do the things predefined by the browser. To find and check the code of these files, you need to gather 2 basic information about the extension first.

1. The ID of the extension you want to check the source code.

Go to chrome://extension page in Chrome, check the Developer Mode¬†option if you haven’t done so, and make a note of a¬†serial number in ID field.

Chrome - Extension ID

2. The Folder Path to the Extension

Go to chrome://version page in Chrome, and press Ctrl + C to copy the content in the Profile Path field into the clipboard.

Chrome - version - profile path

Now, open File Explorer in your Windows, paste the profile path into the address bar and hit Enter to go straight to the folder that stores all the extensions installed in your Chrome, then head into the folder that has the same name as the extension ID you made a note of above.

Once you are in the folder, you are free to pick any of the files there to check out the code written in that file.

Through an extension

If the above method is a bit too cumbersome, there is actually an extension called Chrome extension source viewer that you can install to easily view the source code of any extensions, not only the ones installed on your Chrome but anyone in the Chrome Web Store.

Once installed, you can open the extension page on the Chrome Web Store (the one you want to check the source code) and click on the CRX button on the extension bar and choose View source button.

Chrome - CRX extension button

Then, you will be able to see the selected extension’s source file to view the source code right in the Chrome window.

CRX Viewer

Leave a Reply

Your email address will not be published. Required fields are marked *