Chrome Profiles and their extensions can take up a lot of space on your Mac. Unfortunately, there is not a straightforward way to see what is taking up that space.
Chrome Profile Analyzer is a Python-based CLI tool that helps you visualize disk usage for each of your Chrome profiles. It parses Google Chrome’s user profiles, locates friendly profile names, calculates disk usage, and extracts details about installed extensions. The tool uses JSON parsing and file system traversal to build detailed usage reports, and now provides several command-line options for customized output.
- Derives user-friendly names from each Chrome profile by reading both the Preferences file and the Local State file.
- Falls back to the directory name if no user-friendly name is found.
- Recursively calculates total disk usage for each profile, displayed in MB.
- Enumerates and computes extension sizes, including all version subfolders.
- Skip listing profiles or extensions smaller than a user-defined minimum size (default 50 MB).
- Displays a note indicating if items were skipped because they were under the threshold.
- Lists profiles and extensions sorted by size in descending order.
- Provides overall summary statistics:
- Total number of profiles scanned
- Total disk usage across all profiles
- Top 5 largest extensions (globally)
- JSON Output:
--json
for a machine-readable JSON dump of all results. - CSV Output:
--csv
for a row-by-row CSV export.
- Profiles or extensions over 1 GB are highlighted in red (ANSI escape codes) in human-readable mode.
--help
displays usage instructions and a summary of all available command-line arguments.
- Uses Python’s built-in logging module.
--debug
sets the logger toDEBUG
level for verbose output. Otherwise, you can specify--log-level INFO
,--log-level WARNING
, etc.
- Python 3.8+
- Standard Libraries (
os
,json
,pathlib
,typing
,argparse
,logging
,csv
) - Optional:
colorama
for cross-platform color support. On many terminals, ANSI colors work fine without it. If you are on Windows, installingcolorama
is recommended for proper color output.
pip install -r requirements.txt
After installing the dependencies, the script can be run as follows:
python chrome-profile-analyzer.py [options]
The script will output a list of Chrome profiles with their friendly names, sizes, and extension details.
Argument | Description | Default |
---|---|---|
--chrome-data-dir | Path to the Chrome User Data directory. | ~/Library/Application Support/Google/Chrome (macOS) |
--debug | Enable debug logging (overrides --log-level). | Disabled |
--log-level | Set logging level (DEBUG, INFO, WARNING, etc.). | INFO |
--min-size-mb | Minimum size (in MB) to display profiles/extensions. | 50.0 |
--json | Output data in JSON format (overrides human-readable output). | Disabled |
--csv | Output data in CSV format (overrides human-readable output). | Disabled |
--help | Show usage instructions and available arguments. | - |
- Basic usage (human-readable output):
python chrome-profile-analyzer.py
• Scans the default Chrome user data directory and prints profiles/extensions ≥ 50 MB.
- Specify a custom Chrome data directory:
python chrome-profile-analyzer.py --chrome-data-dir "/path/to/chrome/user/data"
- Enable debug logging:
python chrome-profile-analyzer.py --debug
or
python chrome-profile-analyzer.py --log-level DEBUG
- Skip profiles/extensions under 100 MB:
python chrome-profile-analyzer.py --min-size-mb 100
- Export output to JSON:
python chrome-profile-analyzer.py --json > profiles.json
- Export output to CSV:
python chrome-profile-analyzer.py --csv > profiles.csv
Displays each profile’s name, path, and size, followed by its extensions. Over-1GB items are highlighted in red.
A JSON list of profiles, where each profile contains:
[
{
"profile_name": "My Profile",
"profile_dir": "/Users/John/Library/Application Support/Google/Chrome/Profile 1",
"profile_size_bytes": 123456789,
"profile_size_mb": 117.74,
"extensions": [
{
"extension_name": "AdBlock",
"extension_dir": "/Users/John/Library/Application Support/Google/Chrome/Profile 1/Extensions/...",
"extension_size_bytes": 321654,
"extension_size_mb": 0.31,
"profile_name": "My Profile"
}
]
}
]
Each row corresponds to a single extension. Profiles with no extensions (or whose extensions are below the threshold) will appear as a single row with empty extension fields.
The tool uses Python’s built-in logging system. You can specify a log level for more detailed output:
python chrome-profile-analyzer.py --log-level DEBUG
If you just want a quick toggle for verbose output, use:
python chrome-profile-analyzer.py --debug
This project is licensed under the MIT License.
- Name: Dallas Crilley
- Website: dallascrilley.com