Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$" "$extension_id%26uc" 
unzip -d "$extension_id-source" "$"

Thx to crxviewer for the magic download URL.

Option 2: Use the CRX Viewer website

Option 3: Use the CRX Viewer extension

The Chrome extension source viewer is open source (github repo) and makes this super easy.

Option 3: View source of locally installed extension

  1. Find your Chrome local profile directory. Open chrome://version/ and find the "Profile Path:` field. Open that folder up.
  2. Open the Extensions/ subfolder
  3. All your extensions are here, with typically readable source.

Mapping between locally installed extension IDs and names

  • On about:extensions, turn on Developer Mode and you'll see IDs under each entry
  • Inside the Extensions/ folders, the manifest.json has a readable name field


Copy link

figital commented Aug 26, 2015

Thanks Paul this looks super handy.

Copy link

serkanh commented Aug 28, 2015

Thanks Paul.

Copy link

kyriakos commented Aug 28, 2015


Copy link

kel commented Aug 28, 2015

Awesome, thanks.

Copy link

Rob--W commented Aug 28, 2015

Hi @paulirish, I was wondering where the surge of stars on my repository came from, and ended up at this gist :)

For the command-line URL, use prodchannel=stable instead of prodchannel=unknown, for the reason given in

Copy link

paulirish commented Oct 10, 2015

@Rob--W thx! updated to stable.

Copy link

loretoparisi commented Oct 16, 2017

@paulirish I have found that some extensions does not download its contents (i.e. the background.js is a void file). Any idea?

Copy link

km3r commented Mar 14, 2018

the file i got seems to be a ".crx" file which couldnt be opened by 7-zip or windows explorer until i renamed the extension to ".crx" or ".tar"

Copy link

amarilindra commented Jun 12, 2019

Another easy way is getting the source code from your own hard disk. You need to first install the extension though.

Copy the ID of extension and navigate to the following path:

Windows: C - Users - [USER NAME] - AppData - Local - Google - Chrome - User Data - Default - Extensions
Mac: /Users/[USER NAME]/Library/Application Support/Google/Chrome/Default/Extensions

Here you will find a folder named with the ID of extension and it contains the complete source code.
Source: Geek Dashboard

Copy link

Yejuke commented Dec 5, 2019

I do not know how to code ;-;

Copy link

hello-smile6 commented Mar 28, 2021


Copy link

zoritaylor123 commented Mar 14, 2022


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment