Windows 11/10 · Chrome / Firefox / Edge · Private & member-only content
Many sites require login to download private galleries. gallery-dl reads cookies directly from your browser — no passwords stored, no manual export needed for Chrome, Firefox, and Edge.
Fastest method
Works for most sites — Instagram, Twitter/X, Pixiv, DeviantArt, Reddit, Patreon and more. Make sure you're logged in to the site in your browser first.
gallery-dl --cookies-from-browser chrome "URL"
gallery-dl --cookies-from-browser firefox "URL"
gallery-dl --cookies-from-browser edge "URL"
gallery-dl --cookies-from-browser brave "URL"
Cookies.txt file method
More reliable for automation and scheduled tasks — export once, reuse many times.
Install Get cookies.txt LOCALLY from the Chrome Web Store or Firefox Add-ons. This exports in Netscape format that gallery-dl understands.
Open the site in your browser and make sure you're fully logged in. Complete any 2FA if required.
Click the extension icon while on the site → Export. Save the file as cookies.txt in your gallery-dl folder, e.g. C:\Tools\gallery-dl\instagram-cookies.txt
Use --cookies flag or add the path to your config file for permanent use.
gallery-dl --cookies "C:\Tools\gallery-dl\instagram-cookies.txt" "URL"
"instagram": {
"cookies": "C:/Tools/gallery-dl/instagram-cookies.txt"
}
Per-site authentication
Required for private accounts and high-res downloads. Log in via browser, then:
gallery-dl --cookies-from-browser chrome "https://www.instagram.com/username/"
Required for private accounts and to access full-resolution media. Twitter cookies expire frequently — re-export if it stops working.
gallery-dl --cookies-from-browser chrome "https://x.com/username/media"
Required for R-18 content and full image downloads. Log in at pixiv.net, then pass cookies.
gallery-dl --cookies-from-browser chrome "https://www.pixiv.net/users/USER_ID"
Required for patron-only content. You must have an active subscription to the creator.
gallery-dl --cookies-from-browser chrome "https://www.patreon.com/creator"
FAQ
--cookies-from-browser command. For cookies.txt files, export a fresh copy. Also make sure your browser is completely closed before gallery-dl reads its cookie database on Windows.--cookies instead.-u USERNAME -p PASSWORD. However, this doesn't work for sites with 2FA or modern auth flows. The --cookies-from-browser method is more reliable and recommended for most sites.config.json:
"extractor": {
"instagram": {
"cookies": "C:/Tools/gallery-dl/cookies.txt"
}
}
This applies cookies automatically for every Instagram download without needing the CLI flag.