3 min read

Convert Get cookies.txt LOCALLY exports to JSON

Get cookies.txt LOCALLY writes a Netscape cookie file from Chrome; paste that file here to convert it to a JSON array CookieMan can import — this page does not replace that extension or read Chrome’s cookie store from the web.

The usual reason to convert is a second profile, an automated test, or a tool that wants objects with sameSite you will have to set yourself, because Netscape never stored that flag.

Get cookies.txt LOCALLYcookies.txt to JSONGet cookies.txt LOCALLY JSONNetscape to JSON
  1. 1
    Export from Get cookies.txt LOCALLY

    On the site you care about, use Get cookies.txt LOCALLY (or an equivalent Netscape exporter) and save the file. Keep the tabs — do not open-and-save in an editor that converts tabs to spaces.

  2. 2
    Convert to JSON Array here

    Paste the file into the converter. Output is JSON Array. #HttpOnly_ lines become "httpOnly": true, not comments.

  3. 3
    Import with the extension

    Open the destination origin in Chrome, Import the JSON in CookieMan, preview domains, Apply, reload. For yt-dlp you can skip JSON and keep the original Netscape file.

Cookies are credentials. Conversion stays in this page — delete the file when you are done.

What Get cookies.txt LOCALLY actually writes

The extension’s job is a Netscape dump: seven tab-separated fields plus the #HttpOnly_ hack. It does not emit CookieMan JSON. After conversion, sameSite is unspecified because the source format has no such column. If the site requires SameSite=None; Secure, set those flags in CookieMan after import, or start from a JSON export instead.

Netscape fieldJSON Array fieldNotes
domain, optional #HttpOnly_ prefixdomain, httpOnlyPrefix is stripped and the flag is set
include_subdomains TRUE/FALSEhostOnly (inverted)TRUE means not host-only
path / secure / expires / name / valuematching fieldsExpiry 0 becomes a session cookie
(none)sameSiteAlways unspecified after this conversion
(none)partitionKeyCHIPS cookies cannot be represented in cookies.txt
This website cannot attach to Get cookies.txt LOCALLY. If the exporter produced spaces instead of tabs, the converter reconstructs the line and warns — see Skipped invalid Netscape line.

When you should not convert at all

yt-dlp, curl and wget want the Netscape file. Converting to JSON and back is a downgrade: you still lack SameSite, and you can introduce a milliseconds-vs-seconds mistake if another tool rewrites expiry. Keep the original file for those CLIs; convert only when Chrome Import (or a test fixture) needs JSON.

Questions people ask

Does Get cookies.txt LOCALLY export JSON?
The extension is built to write Netscape cookies.txt. Paste that file here to get a JSON array. Other cookie editors export JSON natively — skip this step if you already have an array of cookie objects.
Why is sameSite unspecified after conversion?
cookies.txt has no SameSite field. The JSON writer cannot invent Lax or Strict. Edit the cookie in CookieMan after import if the site needs a specific value.
Can this page export cookies from Chrome without an extension?
No. A website cannot read HttpOnly cookies or another origin’s jar. Use Get cookies.txt LOCALLY, CookieMan, or DevTools to obtain the file, then convert it here.
3 min read

yt-dlp cookies.txt from Chrome Export

Convert Chrome JSON or a browser dump to the Netscape file yt-dlp --cookies expects, with tabs, Unix seconds and #HttpOnly_ session cookies intact.

yt-dlp cookies.txtyt-dlp --cookies Open the guide
3 min read

JSON Array vs cookies.txt Field Mapping

Side-by-side mapping of CookieMan JSON Array fields to Netscape cookies.txt. SameSite, partitionKey and store metadata never survive the seven-column file.

JSON vs cookies.txtcookies.txt field mapping Open the guide
3 min read

curl -b cookies.txt from JSON Export

Turn a Chrome JSON export into the Netscape file curl -b and -c expect: tabs, #HttpOnly_ prefixes, Unix-second expiry and a trailing newline.

curl cookies.txtcurl -b cookies Open the guide

Apply this on live cookies

The converter rewrites files. The extension reads and writes the jar in Chrome, including HttpOnly cookies.

Free and MIT-licensed · Chrome, Edge and other Chromium browsers · Nothing leaves your machine