A command-line tool for working with Chrome extension files (.crx) built with Rust. This tool allows you to convert Chrome extensions between CRX and ZIP formats, download extensions directly from the Chrome Web Store, and more.
- Convert Chrome extension files (.crx) to ZIP format
- Generate download URLs for Chrome extensions by ID
- Download Chrome extensions directly from the Chrome Web Store
- Option to convert downloaded extensions to ZIP format automatically
- Support for both CRX version 2 and 3 formats
- Verbose logging options for debugging
- Ensure you have Rust and Cargo installed (rust-lang.org/tools/install)
- Clone this repository
- Build the project:
cd crx
cargo build --release
- The binary will be available at
target/release/crx
- Optionally, move it to your PATH:
sudo cp target/release/crx /usr/local/bin/
# Convert a CRX file to ZIP
crx convert extension.crx
# Get download URL for an extension
crx fetch-url --id gighmmpiobklfepjocnamgkkbiglidom
# Download and convert an extension in one step
crx download --id gighmmpiobklfepjocnamgkkbiglidom --out-zip extension.zip
crx convert path/to/extension.crx
This will convert the CRX file to a ZIP file in the same directory, keeping the same base filename.
To specify a custom output path:
crx convert path/to/extension.crx --output custom/output/path.zip
crx fetch-url --id gighmmpiobklfepjocnamgkkbiglidom
Replace gighmmpiobklfepjocnamgkkbiglidom
with the ID of the extension you want to download.
crx download --id gighmmpiobklfepjocnamgkkbiglidom
To save the CRX file:
crx download --id gighmmpiobklfepjocnamgkkbiglidom --out-crx path/to/save.crx
To download and convert to ZIP in one step:
crx download --id gighmmpiobklfepjocnamgkkbiglidom --out-zip path/to/save.zip
Add -v
or -vv
for more detailed logging:
crx convert path/to/extension.crx -v
For detailed help on any command, use:
crx --help
crx convert --help
crx fetch-url --help
crx download --help
- Development: Extract and modify Chrome extensions for development or learning purposes
- Security Analysis: Extract extensions for security auditing and code inspection
- Backup: Save extensions locally in case they are removed from the Chrome Web Store
- Deployment: Convert between formats for testing and deployment workflows
- Automation: Include in scripts for batch processing of extensions
The tool supports both CRX version 2 and 3 formats, extracting the ZIP data from the CRX container file. Chrome extensions are essentially ZIP archives with a special CRX header and signature, which this tool can process and strip away.
-
For CRX files, the tool:
- Verifies the CRX magic number ("Cr24")
- Determines the CRX format version
- Extracts header data, public keys, and signatures
- Extracts the raw ZIP data from the appropriate offset
- Saves the ZIP data to a new file
-
For downloading extensions, the tool:
- Constructs the Chrome Web Store download URL using the extension ID
- Downloads the CRX file
- Optionally converts the downloaded CRX to ZIP format
- Rust 1.63 or newer
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Feel free to submit issues or pull requests.
- The Rust community for providing excellent libraries and tools
- Chrome Extension developers for inspiring this tool
- All contributors and testers who helped improve this project
A CRX file is a Chrome extension package format. It's essentially a ZIP file with additional metadata and signatures that Chrome uses to verify the extension's authenticity.
Converting a CRX to ZIP allows you to inspect the extension's code, modify it for personal use, or learn from it. It's also useful for security researchers analyzing extensions.
Yes, this tool is legal for personal use, development, and research purposes. However, redistributing modified extensions or bypassing security measures may violate Chrome Web Store terms or copyright laws.
This version of the tool doesn't support converting ZIP back to a signed CRX, as this would require private keys used by the original developer.
Some extensions may be region-restricted, not publicly available, or have been removed from the Chrome Web Store.