Bokal › export cookies txt chrome
How to export cookies.txt from Chrome (Netscape format)
The format curl, wget and yt-dlp expect — exported straight from your browser, without pasting your session into a website.
Last updated 26 August 2026.
What the Netscape cookie format is
Netscape's cookies.txt is a plain, tab-separated file that predates almost everything else still using it. Each line is one cookie:
# Netscape HTTP Cookie File
.example.com TRUE / TRUE 1788000000 session abc123
The columns are domain, include-subdomains flag, path, secure flag, expiry as a Unix timestamp, name, and value. It is the format curl --cookie, wget --load-cookies and yt-dlp --cookies all read.
Exporting it
Log in to the site in Chrome
Sign in as normal, so the browser is holding a valid session.
Open Bokal on that tab
Click the toolbar icon and grant access to that one site when prompted.
Press "Export Netscape"
You get a
.txtfile in the Netscape format, containing the cookies for that site — includingHttpOnlyones, which is usually the point.
Using it with curl
curl --cookie example-cookies.txt https://example.com/account
With wget
wget --load-cookies example-cookies.txt https://example.com/file.zip
With yt-dlp
yt-dlp --cookies example-cookies.txt "https://example.com/watch?v=..."
Why export rather than use a "cookies to txt" website: pasting a session cookie into a third-party site hands that site your login. Bokal generates the file locally — there is no Bokal server, and free users make zero network calls, which you can confirm in DevTools → Network.
Honest limitations
- Export only. Bokal writes Netscape
cookies.txtbut does not currently parse it back in. To import, use JSON (it reads Cookie-Editor and EditThisCookie exports) or a cookie-header string. - Session cookies have no real expiry. They are written with a placeholder; some tools treat those as already expired. If a session-only cookie is not being sent, give it an explicit future expiry before exporting.
- Cookies are not always the whole session. If the site keeps its auth token in
localStorage, no cookie export of any format will carry it.
Treat the file as a credential. A cookies.txt holding a live session is functionally your password for that site. Do not commit it, do not share it in a ticket, and delete it when the job is done.
Other formats Bokal exports
- JSON — Bokal's own format; also reads Cookie-Editor and EditThisCookie exports.
- Cookie-header string —
name=value; name=valuecopied to the clipboard, for a one-offcurl -Hor an HTTP client. - Playwright
storageState/addCookies, PuppeteersetCookie— see the Playwright guide.
Frequently asked
Does this include HttpOnly cookies?
Yes. Bokal reads cookies through Chrome's cookies API rather than document.cookie, so HttpOnly session cookies are included — which is normally the whole reason for exporting.
yt-dlp says my cookies file is invalid
Check the first line is the # Netscape HTTP Cookie File header (Bokal writes it), and that the file has not been converted to spaces by an editor — the format is tab-separated and strict about it.
Can I import a cookies.txt back into Chrome?
Not with Bokal today; Netscape is export-only. JSON and cookie-header strings are the supported import paths.
Try Bokal
Free and open source (GPL-3.0). No account, no telemetry, no install-time site access.