Cross-platform browser cookie extractor for
yt-dlpβ Windows, macOS, Linux. Created by SyntX.
- Multi-browser support β Chrome, Edge, Brave, Firefox
- Site filtering β Extract cookies for a specific domain with
--site youtube.com - Smart polling mode β Automatically polls the cookie database for ~36 seconds to capture cookies that appear over time (page loads, redirects, JS execution)
- Lock-bypass technology β Copies the locked SQLite database to a temporary location before reading, with URI
immutable=1fallback β no need to close your browser! - Process detection β Detects running browsers and gives helpful diagnostic messages
- Dual output β Netscape cookies.txt (for
yt-dlp --cookies) and JSON (yt-dlp --cookies-json) - Cross-platform β Windows (MSVC + MinGW), macOS, Linux
# Extract ALL cookies from Chrome
CookieMonster --chrome --txt -o cookies.txt
# Extract cookies for a specific domain (with ~36s polling)
CookieMonster --chrome --site youtube.com --txt -o cookies.txt
# Shorthand β bare domain syntax
CookieMonster --chrome --youtube.com --txt -o cookies.txt
# Firefox with JSON output
CookieMonster -b firefox --json -o cookies.json
# Check which browsers are detected
CookieMonster --list-browsers| Flag | Browser | Windows | macOS | Linux |
|---|---|---|---|---|
--chrome / -c |
Google Chrome | β | β³ | β³ |
--edge / -e |
Microsoft Edge | β | β³ | β³ |
--brave |
Brave | β | β³ | β³ |
--firefox / -f |
Firefox | β | β | β |
-b <name> |
Any above |
β = fully working | β³ = Firefox-only (Chrome stub, needs platform keychain integration)
# Using --site flag
CookieMonster --chrome --site youtube.com --txt -o cookies.txt
# Using --domain alias
CookieMonster --chrome --domain youtube.com --txt -o cookies.txt
# Shorthand with bare --domain.com
CookieMonster --chrome --youtube.com --txt -o cookies.txtWhen --site is provided, polling mode activates automatically:
- Polls the cookie database every 3 seconds for ~36 seconds
- Detects and collects new cookies as they appear
- Deduplicates across polls (no duplicates in output)
- Shows live progress:
Poll 3/12 β 143 read, +5 new (total: 89) - Filters output to only include cookies matching the specified domain
--txtβ Netscape HTTP Cookie File (yt-dlp --cookies cookies.txt)--jsonβ JSON array (yt-dlp --cookies-json cookies.json)
If something goes wrong, the error messages now include:
- The full file path to the cookie database
- The SQLite error code (e.g.
SQLITE_CANTOPEN) - A list of running browsers that might be interfering
- Specific guidance on how to resolve the issue
Chrome holds an exclusive lock on its SQLite Cookies database while running, which normally prevents other tools from reading it. CookieMonster bypasses this with a two-tier strategy:
- Copy to temp β Copies the locked database file to
%TEMP%, then opens the copy (Windows allows copying locked files) - URI immutable mode β If the copy also fails (rare), falls back to SQLite's
?mode=ro&immutable=1URI which skips all file locking entirely
This means you can keep Chrome open while extracting cookies β no more "Failed to open cookie database" errors.
The same technique is applied to Firefox's cookies.sqlite.
Chromium browsers (Chrome, Edge, Brave):
- Reads the encrypted AES-256 key from
Local StateJSON - Platform-specific key unwrap:
- Windows: DPAPI (
CryptUnprotectData) - macOS: Keychain (coming)
- Linux: libsecret (coming)
- Windows: DPAPI (
- Opens the
CookiesSQLite database - Decrypts each cookie with AES-256-GCM
- Writes to output file
Firefox:
- Finds the default profile's
cookies.sqlite - Reads cookies directly (plaintext)
| Component | Windows | macOS | Linux |
|---|---|---|---|
| SQLite3 | Bundled | Bundled | Bundled |
| nlohmann/json | Bundled | Bundled | Bundled |
| AES-GCM | BCrypt (built-in) | OpenSSL (brew install openssl) |
OpenSSL (libssl-dev) |
| DPAPI | Built-in | β | β |
cmake -P cmake/DownloadDeps.cmake
cmake -B build -S .
cmake --build build --config ReleaseStatically links the CRT β no VC++ redistributable needed.
cmake -P cmake/DownloadDeps.cmake
cmake -B build -S . -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake --build buildbrew install openssl
cmake -P cmake/DownloadDeps.cmake
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build buildsudo apt install libssl-dev
cmake -P cmake/DownloadDeps.cmake
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build buildOn systems where SSL certificate verification fails during dependency download, set:
cmake -P cmake/DownloadDeps.cmake -DCMAKE_TLS_VERIFY=0Trigger a release build manually from the Actions tab:
workflow_dispatch β enter version tag (e.g. v1.1.0)
This builds all four platforms and creates a GitHub Release with the zipped binaries attached.
Copyright (c) 2026 SyntX. All rights reserved.
Licensed under the MIT License.