# CookieMan — full guide text Source of truth: https://cookieman.pro/llms.txt ## Cookie-Editor alternative that still exports six formats URL: https://cookieman.pro/guides/cookie-editor-alternative/ Cookie-Editor lists and edits cookies for the current tab; it is not an official Chrome product, and neither is CookieMan. Use CookieMan when you need to convert that JSON into cookies.txt, a Cookie: header, Set-Cookie lines or Base64, or to apply the same file in another Chromium profile. This page does not read Cookie-Editor's storage. Export JSON from that extension first, then paste it here or into CookieMan's Import panel. Steps: 1. Export JSON from Cookie-Editor: Open Cookie-Editor on the target site and export the cookie list as a JSON array. The objects use name, value, domain, path, expirationDate, hostOnly, httpOnly, secure and sameSite. 2. Paste into this converter: Paste the export below. Detection treats it as a JSON array — the same shape EditThisCookie used. Set the output to JSON Array to keep every attribute, or Netscape if the next consumer is curl. 3. Import in Chrome or feed a CLI: In CookieMan, open the destination site, Import → paste → preview → Apply. For curl, switch output to Netscape and save as cookies.txt, then run curl -b cookies.txt. Q: Is CookieMan the official Cookie-Editor replacement? A: No. Cookie-Editor is a different extension. CookieMan is an independent Manifest V3 cookie editor that reads the same JSON array shape so you can keep working after an export. Q: Can I import Cookie-Editor JSON into Chrome with CookieMan? A: Yes. Open the destination site, click Import, paste the JSON, check the preview and Apply. The parser is the same engine as this page. Q: How do I turn Cookie-Editor JSON into cookies.txt? A: Paste the JSON into the converter on this page and set output to Netscape cookies.txt. HttpOnly cookies are written with the #HttpOnly_ prefix curl expects. See EditThisCookie JSON to cookies.txt for the same job from that exporter. --- ## Convert EditThisCookie JSON to Netscape cookies.txt URL: https://cookieman.pro/guides/editthiscookie-json-to-cookies-txt/ Convert EditThisCookie JSON to cookies.txt by pasting the array below and leaving the output on Netscape — this page rewrites tabs, the #HttpOnly_ prefix and Unix-second expiry; it does not install EditThisCookie. EditThisCookie itself is Manifest V2 and no longer runs in current Chrome. If you still have an old JSON export, that file is enough. The EditThisCookie alternative page covers installing CookieMan as the editor; this page is only the conversion job. Steps: 1. Get the JSON export: Use an existing EditThisCookie export file, or export JSON from any editor that uses the same object shape (expirationDate, hostOnly, httpOnly, sameSite). 2. Convert to Netscape on this page: Paste the array into the converter. Output is preset to Netscape cookies.txt. Copy or download the file — conversion is local. 3. Hand the file to curl or yt-dlp: Save as cookies.txt and run curl -b cookies.txt https://example.com/ or yt-dlp --cookies cookies.txt URL. Do not commit the file. Q: Does EditThisCookie JSON need conversion before Chrome import? A: No. CookieMan Import detects the JSON array and applies it. Convert to cookies.txt only when the next tool is curl, wget, yt-dlp or another Netscape reader. Q: Why is sameSite missing after conversion? A: The Netscape format has seven tab-separated fields and no SameSite column. Re-importing cookies.txt into Chrome leaves sameSite unspecified. Keep JSON when you need Lax/Strict/None. Q: Will #HttpOnly_ lines be treated as comments? A: Not by this parser or by curl. Naive scripts that skip every line starting with # drop the session cookie. Use a reader that strips the prefix, or stay on JSON. --- ## Convert Get cookies.txt LOCALLY exports to JSON URL: https://cookieman.pro/guides/get-cookies-txt-locally-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. Steps: 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. Convert to JSON Array here: Paste the file into the converter. Output is JSON Array. #HttpOnly_ lines become "httpOnly": true, not comments. 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. Q: Does Get cookies.txt LOCALLY export JSON? A: 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. Q: Why is sameSite unspecified after conversion? A: 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. Q: Can this page export cookies from Chrome without an extension? A: 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. --- ## Convert a Postman Cookie header to JSON cookies URL: https://cookieman.pro/guides/postman-cookies-to-json/ A Postman Cookie header is a single Cookie: request line — paste it here to expand each name=value pair into a JSON cookie object. Postman is not affiliated with CookieMan; this page only rewrites the header text you already copied. The header format has no domain, path, expiry, Secure, HttpOnly or SameSite. The parser therefore warns Header string format has no domain info; defaulted to localhost. Fix domains before you import into Chrome. Steps: 1. Copy the header from Postman: In the request, open Headers and copy the Cookie value, with or without the Cookie: prefix. Alternatively copy from the Code snippet (“cURL”). 2. Convert on this page: Paste into the converter. Output is JSON Array so you can edit domain per cookie. Switch to Netscape only after domains are real hosts, not localhost. 3. Set domains, then import or send: Replace localhost with the API host (leading dot if subdomains should receive the cookie). Import in CookieMan on that origin, or export Netscape for curl -b. Q: Can I paste a full Postman collection JSON? A: No. The detector looks for cookie formats, not a Postman collection. Copy the Cookie header (or Set-Cookie lines) out of the request/response and paste only that. Q: Why do converted cookies say domain localhost? A: A request Cookie header has no Domain attribute. The parser must pick a host; it uses localhost and emits a warning rather than guessing example.com. Q: How do I send the result from Axios or fetch? A: Convert to Header String and put the line in headers: { Cookie: ... }. That still will not set HttpOnly cookies in a browser. See Axios Cookie header from JSON. --- ## Convert Insomnia cookies to Netscape cookies.txt URL: https://cookieman.pro/guides/insomnia-cookies-to-cookies-txt/ Insomnia stores a cookie jar per request context; copy the Cookie header or a JSON export and convert it here to Netscape cookies.txt for curl. Insomnia is a separate Kong product — this page only rewrites text you paste. If you copy the request header, domains will be localhost until you switch output to JSON, edit hosts, and convert again. Prefer Set-Cookie lines from the response timeline when you have them. Steps: 1. Copy cookies out of Insomnia: From Cookie Jar or the request Headers tab, copy the Cookie header. If you captured response Set-Cookie lines, copy those instead — they keep Domain and flags. 2. Rewrite to Netscape here: Paste below. Output is Netscape. If the status line warns about localhost, switch to JSON Array, fix domain, paste that JSON back, then export Netscape. 3. Load the file in curl or wget: Save as cookies.txt and run curl -b cookies.txt -c cookies.txt https://api.example.com/v1. Use wget --load-cookies the same way. Q: Can CookieMan read my Insomnia cookie jar from disk? A: No. Paste the header, Set-Cookie lines or JSON. The converter never opens Insomnia’s application data directory. Q: Why does curl ignore the cookies.txt I just saved? A: Usually the domain column is still localhost because the source was a Cookie header. Edit domains in JSON, re-export Netscape, and confirm the host matches the URL you pass to curl. Q: Does Insomnia speak Netscape natively? A: Insomnia’s jar is not a cookies.txt file. Convert here when the next process is curl, wget or yt-dlp. Stay on JSON when the next process is CookieMan Import. --- ## Convert Cookie Quick Manager exports to JSON URL: https://cookieman.pro/guides/cookie-quick-manager-to-json/ Cookie Quick Manager is a Firefox extension that exports cookies as Netscape or JSON; paste that export here to produce a JSON array you can import in Chrome with CookieMan. This is not the Cookie Quick Manager site, and a web page cannot read Firefox’s cookies.sqlite. Prefer the extension’s Netscape or JSON export over copying a request header. Header-only copies lose Domain and HttpOnly. Steps: 1. Export from Cookie Quick Manager: In Firefox, export the site’s cookies as Netscape cookies.txt or as JSON. Avoid CSV unless you are ready to rebuild seven Netscape fields by hand. 2. Convert to JSON Array: Paste the file below. Netscape becomes JSON with httpOnly taken from #HttpOnly_. If you already exported JSON objects, detection keeps them. 3. Import in Chromium: Install CookieMan in Chrome or Edge, open the same origin, Import → preview → Apply. Host-only versus dotted domains must match what Firefox stored. Q: Can I import cookies.sqlite into this converter? A: No. Paste Netscape or JSON text. SQLite is a different schema and is not a supported format. Q: Will Firefox SameSite values survive a cookies.txt export? A: Not through Netscape. If Cookie Quick Manager’s JSON export includes SameSite, paste JSON instead of cookies.txt. Q: Is this an official Cookie Quick Manager page? A: No. It is a conversion guide for files that extension can emit. Use Cookie Quick Manager itself to read the Firefox jar. --- ## Convert Selenium get_cookies() JSON to a cookie file URL: https://cookieman.pro/guides/selenium-cookies-to-json/ Selenium get_cookies() returns a JSON list of dicts with expiry (not expirationDate); paste that list here to normalise it for CookieMan Import or Netscape cookies.txt. This is for fixtures and debugging your own tests. It is not a way to pull someone else’s session out of a remote WebDriver. Steps: 1. Dump cookies from WebDriver: In Python, json.dumps(driver.get_cookies()). In Java, serialize driver.manage().getCookies() to a JSON array of objects with name, value, domain, path, expiry. 2. Normalise in the converter: Paste the array. expiry maps to expirationDate. Values <= 0 become session cookies. Output JSON Array for Chrome, or switch to Netscape for curl. 3. Add them back or send from curl: CookieMan Import on the test origin, or driver.add_cookie() with the JSON objects, or curl -b cookies.txt after a Netscape export. Q: Why does add_cookie fail after import? A: You must be on a matching origin first. __Host- names still need Secure, Path=/ and no Domain. SameSite=None still needs Secure. The converter does not relax Chrome’s rules. Q: Does get_cookies include HttpOnly cookies? A: Yes. WebDriver reads the browser store, not document.cookie. Keep httpOnly when you convert; Netscape will emit #HttpOnly_. Q: How is this different from Playwright storageState? A: Playwright wraps cookies in { "cookies": [...], "origins": [] } and uses expires: -1 for session cookies. That wrapper is unwrapped automatically — see Playwright storageState to cookies.txt. --- ## Build a yt-dlp cookies.txt from a Chrome export URL: https://cookieman.pro/guides/yt-dlp-cookies-txt/ yt-dlp reads a Netscape cookies.txt via --cookies; convert a Chrome JSON export (CookieMan, Cookie-Editor, EditThisCookie) into that file here. This page is not yt-dlp, and it will not pull cookies out of Chrome by itself. --cookies-from-browser is a different path that talks to the browser profile directly. Use this converter when you already have an export and want a file you can pass in CI or on a machine without the profile. Steps: 1. Export cookies from Chrome: Open the site in Chrome, export JSON from CookieMan (current site). Alternatively paste an existing Netscape dump — it will be normalised (tabs, header, seconds). 2. Convert to Netscape here: Paste the export. Output is cookies.txt. Check that HttpOnly session cookies appear with #HttpOnly_ and that expiry is 10 digits, not 13. 3. Pass the file to yt-dlp: Save as cookies.txt and run yt-dlp --cookies cookies.txt URL. Keep the file out of git. When finished, delete it and rotate the site session if it was privileged. Q: Should I use --cookies or --cookies-from-browser? A: --cookies-from-browser reads the profile on that machine. --cookies reads a file. Use the file when the downloader runs on another host, in CI, or when you do not want yt-dlp opening the browser profile. Q: Why does yt-dlp say the Netscape file is invalid? A: Tabs replaced by spaces, 13-digit expiry, or HttpOnly lines dropped as comments. Paste the file here, export Netscape again, and retry. Exact errors are documented under Skipped invalid Netscape line. Q: Can this website log into a video site for me? A: No. Export cookies from a browser where you are already logged in. The converter only changes formats. --- ## Convert HAR Set-Cookie headers to JSON cookies URL: https://cookieman.pro/guides/har-set-cookie-to-json/ HAR files store Set-Cookie response headers, not a CookieMan JSON array — copy those lines out of DevTools or a proxy export and paste them here to build importable JSON. The detector does not walk log.entries[].response.headers for you. That limitation is deliberate: a HAR also contains URLs, bodies and tokens you should not upload anywhere. Paste only the Set-Cookie lines you need. Steps: 1. Extract Set-Cookie lines: In Chrome DevTools Network, select the response, copy each Set-Cookie header, or open the HAR and copy the header values. One cookie per line, with or without the Set-Cookie: prefix. 2. Convert on this page: Paste the lines. Detection is Set-Cookie. Output JSON Array keeps Domain, Path, Secure, HttpOnly, SameSite and Expires/Max-Age. 3. Import or replay: Import in CookieMan on the host that issued the cookies, or switch output to Netscape for curl. Do not commit the HAR. Q: Can I drop a .har file into the converter? A: No. Extract Set-Cookie header values. The tool parses cookie formats, not HTTP Archive documents. Q: Max-Age or Expires — which wins? A: If both appear on one line, both are applied in order; Max-Age overwrites expirationDate because it is parsed later. Prefer one. Q: Are request Cookie headers in the HAR usable? A: Yes, but they lose attributes. Prefer response Set-Cookie. See Postman Cookie header to JSON for the header-only path. --- ## Convert JSON cookies to a curl -b cookies.txt file URL: https://cookieman.pro/guides/curl-cookies-txt/ curl sends Netscape cookies.txt with -b (and writes updates with -c); convert a JSON export from CookieMan into that file here so HttpOnly cookies keep the #HttpOnly_ prefix. This is not a curl tutorial for stealing sessions. Export cookies from a browser you already control, convert the text, run curl against hosts you are allowed to test. Steps: 1. Export JSON from the browser: Open the site in Chrome, export JSON Array from CookieMan (current site). You can also paste Set-Cookie lines; they will be detected. 2. Convert to Netscape on this page: Paste below. Output is cookies.txt. Confirm session cookies use expiry 0 and HttpOnly lines start with #HttpOnly_. 3. Call curl: Save the output as cookies.txt and run curl -b cookies.txt -c cookies.txt https://example.com/dashboard. Drop -c if you do not want the jar updated. Q: Is -b enough, or do I need -c too? A: -b sends the file. -c writes new Set-Cookie values back. Use both when you are following a login flow; use only -b for a read-only fetch. Q: Why does curl send the cookie but Chrome does not after re-import? A: Usually SameSite or host-only. cookies.txt cannot store SameSite. Re-import JSON if the browser must enforce Lax/Strict/None. Q: Does curl understand #HttpOnly_? A: Yes. The prefix is curl’s own convention. This serializer writes it; this parser reads it. Tools that skip # comments drop the cookie — see #HttpOnly_ dropped as a comment. --- ## Build a wget --load-cookies file from JSON URL: https://cookieman.pro/guides/wget-load-cookies/ wget --load-cookies reads the same Netscape cookies.txt as curl; convert Chrome JSON to that file here, then pass --keep-session-cookies if you also save the jar — otherwise expiry 0 rows disappear. wget2 uses the same Netscape shape for --load-cookies. This page does not talk to GNU wget; it only rewrites the file. Steps: 1. Export JSON from Chrome: CookieMan → Export → JSON Array for the current site. Session cookies must be included; they become expiry 0 in Netscape. 2. Convert to cookies.txt: Paste into the converter (output Netscape). Download the file. Tabs and the magic header are written for you. 3. Run wget: Use --load-cookies cookies.txt --save-cookies cookies.txt --keep-session-cookies when you need the jar to still contain session tokens after the run. Q: Does wget need the # Netscape HTTP Cookie File header? A: It is tolerant, but curl and yt-dlp are happier with it. This serializer always writes the header and a trailing newline. Q: Can I pass JSON to wget? A: No. Convert to Netscape first. wget has no JSON cookie reader. Q: Why did session cookies vanish after wget saved the file? A: Missing --keep-session-cookies. Reload the original JSON, convert again, and add the flag. --- ## Feed HTTPie a Cookie header or cookies.txt from JSON URL: https://cookieman.pro/guides/httpie-session-cookies/ HTTPie sends cookies as a Cookie header or via a session file; convert JSON cookies to that header here (output is preset to Header String). HTTPie is not CookieMan — paste an export, do not expect this page to read ~/.config/httpie. A header has no Domain. That is correct for a single http call to one host. For a reusable jar, switch output to Netscape instead. Steps: 1. Export JSON from the browser: CookieMan JSON Array for the API host. Drop cookies you do not want on the request. 2. Convert to a Cookie header: Paste below. Copy the Header String output. For a Netscape jar, change the dropdown to Netscape and save cookies.txt. 3. Send with HTTPie: Pass Cookie:... as a header, or use an HTTPie session that already stored cookies from a previous response. Q: Can I paste an HTTPie session JSON file? A: No. Extract cookies from it or export JSON from CookieMan. An HTTPie session document has a different schema and will not detect as a cookie array. Q: Should I use a Netscape file with HTTPie? A: HTTPie prefers headers or its own session files. Use Netscape when the next process is curl/wget. Convert twice if you need both. Q: Why is HttpOnly missing from the header? A: Request Cookie headers never include attributes. HttpOnly only exists on stored cookies and Set-Cookie. The values still appear in the header — the flag does not. --- ## Load a Requests CookieJar from JSON or cookies.txt URL: https://cookieman.pro/guides/python-requests-cookiejar/ Python Requests loads Netscape files with http.cookiejar.MozillaCookieJar; convert a Chrome JSON export to cookies.txt here, then jar.load() before requests.get. A JSON map of name→value is not enough for a jar: it has no domain. If you only have a map, convert to JSON Array, set domain, then export Netscape. Steps: 1. Get a full-fidelity export: CookieMan JSON Array, not a JSON map. Maps default every cookie to localhost — JSON Map vs JSON Array. 2. Convert to Netscape: Paste the array. Download cookies.txt. HttpOnly becomes #HttpOnly_, which MozillaCookieJar understands. 3. Load the jar in Requests: Use the snippet below. Point requests.get at a URL whose host matches column 1 of the file. Q: Does Requests parse CookieMan JSON directly? A: No. Use Netscape + MozillaCookieJar, or iterate the JSON and session.cookies.set(name, value, domain=..., path=...). Q: Why does MozillaCookieJar skip my lines? A: Spaces instead of tabs, or a missing newline. Re-export from this converter. Session rows use expiry 0; that is valid. Q: http.cookiejar vs requests.cookies? A: requests.Session.cookies is a RequestsCookieJar that wraps cookiejar. Assigning a loaded MozillaCookieJar works. httpx is a different client — httpx cookies from Netscape. --- ## Load httpx cookies from a Netscape cookies.txt URL: https://cookieman.pro/guides/httpx-cookies-txt/ httpx does not read cookies.txt itself; convert your export to Netscape here, load it with MozillaCookieJar, and pass the cookies into httpx.Client(cookies=...). The unique step is the bridge: httpx’s Cookies object wants name/value/domain, not a file path. This converter produces the file; the snippet below loads it. Steps: 1. Export JSON from Chrome: CookieMan JSON Array for the host httpx will call. 2. Convert to Netscape: Paste and download cookies.txt. Check domains match the URL you will request. 3. Load into httpx: Run the snippet. Confirm client.cookies lists the names before the first request. Q: Is there an httpx.load_cookies(path) helper? A: Not in httpx. Use cookiejar, then cookies.set. Third-party wrappers exist; this snippet uses the stdlib only. Q: Do Secure cookies work on http://localhost? A: Browsers special-case localhost; httpx does not have to. If secure is true, call HTTPS or expect the client to withhold the cookie. Q: Can I pass a Cookie header instead? A: Yes — convert to Header String and set headers={"Cookie": ...}. You lose jar matching. Fine for a single host. --- ## Convert Playwright storageState JSON to cookies.txt URL: https://cookieman.pro/guides/playwright-storage-state-cookies/ Playwright storageState is a JSON object with a cookies array and origins; paste the file here and the detector unwraps the array — expires: -1 becomes a session cookie, not a timestamp in 1969. A website cannot call browser.storageState() for you. Dump the file from your test, then convert. Steps: 1. Dump storageState: In a Playwright test or codegen session, await context.storageState({ path: "state.json" }) after login. 2. Convert on this page: Paste the whole file, not just the inner array. You should see a warning: Unwrapped cookies array from a storageState-style object. Output is Netscape for CLI, or switch to JSON Array for CookieMan. 3. Use the file: curl -b cookies.txt, or CookieMan Import of the JSON Array. To feed Playwright again, keep the original storageState — it still has origins localStorage which this converter ignores. Q: Do I need to extract the cookies array by hand? A: No. Objects with a cookies array are unwrapped. A bare array still detects as JSON Array. Q: Why did my session cookie expire immediately? A: An older converter treated -1 as a timestamp. This one does not. Re-paste the storageState file here and export again. Q: Can I convert cookies.txt back to storageState? A: You get a cookie array, not a full storageState document. Wrap it yourself as { "cookies": [...], "origins": [] } if Playwright is the destination. --- ## Convert Puppeteer page.cookies() JSON to cookies.txt URL: https://cookieman.pro/guides/puppeteer-cookies-json/ Puppeteer page.cookies() returns a JSON array of cookie objects; paste it here to write Netscape cookies.txt for curl or a cleaned JSON array for CookieMan. This is not the Puppeteer documentation — it is the conversion step after you dump cookies from a browser you launched. Steps: 1. Dump cookies from Puppeteer: JSON.stringify(await page.cookies()) after the page has set them. Newer Puppeteer also has browser.cookies() across contexts. 2. Convert here: Paste the array. Output Netscape for CLI. Switch to JSON Array to import in Chrome with CookieMan. 3. Reload or send: page.setCookie(...cookies) with the JSON objects, or curl -b cookies.txt. You must be on a matching origin before setCookie. Q: page.cookies() vs document.cookie? A: page.cookies() uses the DevTools protocol and includes HttpOnly. document.cookie does not. Always dump via Puppeteer’s API. Q: Why is size missing after conversion? A: CookieMan JSON does not store size. Chrome computes it. Re-reading cookies from the browser restores it. Q: Can I convert cookies.txt back for setCookie? A: Yes — paste Netscape, output JSON Array, pass the objects to setCookie. SameSite will be unspecified unless you set it. --- ## Build an Axios Cookie header from JSON cookies URL: https://cookieman.pro/guides/axios-cookie-header/ Axios in Node sends a Cookie header you attach yourself; convert a JSON export to that name=value; name=value line here. In a browser, Axios cannot force HttpOnly cookies — the header is ignored or forbidden. This is the request header, not Set-Cookie. If you have response headers, use Cookie header vs Set-Cookie first. Steps: 1. Export JSON from Chrome: CookieMan JSON Array. Remove cookies you do not want on the API call. 2. Convert to Header String: Paste below. Copy the output. The serializer does not emit a Cookie: prefix — Axios wants the value only. 3. Attach in Node Axios: Set headers.Cookie on the instance or the request. Do not ship the header in frontend bundles. Q: Why does Axios in the browser ignore my Cookie header? A: Cookie is a forbidden request header in browsers. Use CookieMan to write the live jar, or run Axios in Node. Q: Should the output include the Cookie: prefix? A: This serializer writes name=value; name=value only. Add the header name in Axios. Pasting a line that already starts with Cookie: is accepted on input. Q: How do I keep Set-Cookie from the Axios response? A: In Node, read response.headers["set-cookie"], paste those lines here as Set-Cookie format, convert to JSON or Netscape. Browsers store Set-Cookie themselves. --- ## JSON Array vs cookies.txt: every field that is lost URL: https://cookieman.pro/guides/json-array-vs-cookies-txt/ JSON Array vs cookies.txt is a lossy conversion: seven tab-separated Netscape columns cannot hold sameSite or partitionKey. Use the converter below to see the rewritten file, then keep JSON when Chrome has to re-import the same flags. Pick JSON Array for backups and browser import. Pick Netscape only for curl, wget, yt-dlp and MozillaCookieJar. Steps: 1. Start from JSON Array: Export from CookieMan with JSON Array — the only lossless format among the six. 2. Convert both ways here: Paste JSON, output Netscape, inspect the table below against the file. Paste the Netscape back with output JSON to see sameSite become unspecified. 3. Choose the consumer: Chrome Import → keep JSON. curl -b → keep Netscape. Do not round-trip through Netscape if SameSite matters. Q: Is cookies.txt lossless if I only have name and value? A: Name, value, domain, path, secure, host-only, expiry and HttpOnly (via prefix) survive. Everything else does not. Most “simple” cookies look fine; auth cookies often need SameSite. Q: Why does column 2 look inverted from hostOnly? A: Netscape stores include-subdomains. TRUE means not host-only. CookieMan JSON stores hostOnly directly. Q: Which format should I commit to a test repo? A: JSON Array with fake values, never live sessions. If the test runner is curl, generate Netscape in CI from that JSON. --- ## JSON Map vs JSON Array: why maps default to localhost URL: https://cookieman.pro/guides/json-map-vs-json-array/ A JSON Map cookie export is a flat { "name": "value" } object; converting it to JSON Array here will warn that each cookie defaulted to localhost because a map has no domain, path or flags. Use a map only for quick scripts. Use an array of objects for anything that must be imported into a browser. Steps: 1. Paste the map: An object whose values are strings is detected as JSON Map. Nested objects under each key are treated as cookie fields with the key as name. 2. Convert to JSON Array: Read the warnings. Every string value becomes a session cookie on localhost. Edit domains in the output before Import. 3. Import only after domains are real: CookieMan will write whatever domain is in the JSON. Leaving localhost is the usual reason an import “works” and the site still shows logged out. Q: Why does detectFormat pick JSON Map not Array? A: The payload starts with { and is not an array. If you also have a cookies array (Playwright), that wrapper is unwrapped as an array instead. Q: Can I export JSON Map from CookieMan on purpose? A: Yes — it is the compact name→value dump. You throw away attributes. Do not use it as a backup format. Q: Is a JSON Map the same as a Cookie header? A: Same information content (names and values), different syntax. Both lack domain. Header detection is used when the text is not valid JSON. --- ## Cookie header vs Set-Cookie: request line versus response URL: https://cookieman.pro/guides/cookie-header-vs-set-cookie/ The Cookie header is what a client sends; Set-Cookie is what a server sends. Paste either here — detection picks Set-Cookie if a line starts with that name or contains Domain/Path/Expires attributes, otherwise a header string. Do not concatenate them. A merged blob confuses attribute tokens with cookie names. Steps: 1. Copy one side of the exchange: From DevTools: request Headers → Cookie, or response Headers → Set-Cookie. From a HAR, copy those header values only. 2. Convert to JSON Array: Paste below. Set-Cookie keeps Domain and flags. A Cookie header will warn and use localhost. 3. Import or replay: JSON → CookieMan Import. Netscape → curl. Header String → Axios/httpie. Match the artefact to the consumer. Q: Which one should I copy from Chrome DevTools? A: Set-Cookie from the response that established the session, if you still have it. The request Cookie header is a fallback that loses flags. Q: Why did Domain become .example.com? A: On Set-Cookie parse, a Domain without a leading dot is stored with a dot and hostOnly: false. That matches typical browser host-scoping for Domain attributes. Q: Can I convert JSON back to Set-Cookie lines? A: Yes — set output to Set-Cookie. Host-only cookies still emit Domain= if domain is non-empty, so a Set-Cookie round-trip can clear host-only. Prefer JSON Array for host-only fidelity. --- ## Decode a Base64 cookie blob back to JSON URL: https://cookieman.pro/guides/base64-cookies-json/ A Base64 cookie export is usually a JSON array wrapped so chat apps and CI variables do not mangle quotes; paste the blob here to decode it and re-emit JSON, Netscape or a header. The warning Decoded from Base64 (inner format: json-array) tells you what was inside. The encoder uses UTF-8 (btoa(unescape(encodeURIComponent(json)))) so non-ASCII values survive. URL-safe Base64 (- / _) is accepted on decode. Steps: 1. Get the Base64 string: From CookieMan Export → Base64, a CI secret, or a chat paste. Whitespace is ignored. 2. Decode here: Paste the blob. If it is valid Base64 wrapping cookies, detection reports the inner format. Output JSON Array unless the next tool wants Netscape. 3. Import or store as text: CookieMan Import accepts the JSON (or the original Base64). Prefer JSON on disk; Base64 is for hostile text fields only. Q: Does CookieMan store cookies as Base64 internally? A: No. Base64 is an export format. The live jar is the browser’s cookie store. The converter never uploads the blob. Q: Why not JSON.parse the Base64 directly? A: You must decode first. Pasting Base64 into a JSON parser throws. Detection tries Base64 before Netscape when the alphabet matches. Q: Can I Base64-encode cookies.txt? A: Yes — decode still works if the inner text is Netscape. Exporting Base64 from this tool always wraps a JSON array, not Netscape. --- ## SameSite is dropped when you export cookies.txt URL: https://cookieman.pro/guides/samesite-cookies-txt-loss/ SameSite is lost in cookies.txt because the Netscape format has seven fields and no eighth for Lax, Strict or None. Convert JSON to Netscape below and back: sameSite becomes unspecified. curl does not need the attribute to send the cookie. Chrome does, if the site set SameSite=None; Secure or Strict. Pick the format for the consumer, not for aesthetics. Steps: 1. Export JSON from Chrome: CookieMan JSON Array includes sameSite as lax, strict, no_restriction or unspecified. 2. Prove the loss in the converter: Paste JSON, output Netscape, copy the file, paste it back with output JSON. The objects no longer have a useful SameSite. 3. Keep JSON for Chrome, Netscape for curl: If the next hop is CookieMan Import, never pass through Netscape. If the next hop is curl, the loss does not matter on the CLI. Q: Will Chrome treat unspecified like Lax? A: Modern Chrome defaults unspecified cookies toward Lax-like behaviour for cross-site writes. That is not the same as restoring an explicit None. Do not round-trip None through Netscape. Q: Does Set-Cookie keep SameSite? A: Yes. Set-Cookie serialisation writes SameSite=Lax|Strict|None. Use that or JSON when the attribute matters. Q: Why does curl still work without SameSite? A: curl is not a browser. It sends the cookie for the matching domain without SameSite policy. The file is fine for CLI and insufficient for Chrome. --- ## Export partitioned CHIPS cookies without losing the key URL: https://cookieman.pro/guides/chips-partitioned-cookie-export/ Partitioned CHIPS cookies export correctly only as JSON Array with partitionKey.topLevelSite. Paste the sample below: Netscape and Header String outputs silently drop the key; Set-Cookie may include a Partitioned token on the wire but this parser cannot restore topLevelSite from that token alone. CookieMan’s popup reads and writes the partition key through chrome.cookies. This website cannot see third-party cookies in your browser — export from the extension first. Steps: 1. Export JSON from CookieMan on the top-level site: Open the publisher origin (the top-level site), export JSON Array. Partitioned third-party cookies include partitionKey. 2. Keep JSON — do not convert to Netscape: Paste here only to inspect. If you must convert, stay on JSON Array. Switching to Netscape is a guaranteed key loss. 3. Import on the same top-level site: Chrome scopes partitioned cookies by top-level site. Import while that site is the active tab or the cookie lands in a different partition and is not sent. Q: Why is the cookie present but never sent in an iframe? A: Wrong partition. The key’s topLevelSite must match the top-level origin. Import JSON while that origin is focused, or the cookie is stored unpartitioned / in another partition. Q: Can I add partitionKey by hand in Netscape? A: There is no column for it. Use JSON Array. Q: Does Cookie-Editor JSON include partitionKey? A: Only if that extension wrote it. CookieMan does. If the key is missing, the cookie is not partitioned after import. --- ## Fix “Could not detect cookie format” URL: https://cookieman.pro/guides/fix-could-not-detect-cookie-format/ Could not detect cookie format is the exact warning CookieMan emits when the paste is none of JSON, Netscape, Header, Set-Cookie or Base64. Paste the blob below: this page will not invent cookies from prose — you must extract a real format, then convert. A leading UTF-8 BOM is stripped automatically. A whole HAR file is not a cookie format. A Postman collection is not a cookie format. Steps: 1. Identify what you actually copied: JSON starts with [ or {. Netscape is tab-separated TRUE/FALSE columns, often with # Netscape HTTP Cookie File. Headers look like name=value; name=value. Set-Cookie lines start with that token or include Domain=. 2. Paste only the cookie payload here: Strip surrounding logs, HAR JSON, email wrappers. If the status still says unknown, try Base64 decode or repair spaces in Netscape. The converter reports the detected format when it works. 3. Use the rewritten output: Copy JSON for CookieMan Import, or Netscape for curl. Do not paste the original log back into Import. Q: Why did a valid-looking JSON object fail? A: A JSON object without cookie-shaped values and without a cookies array is treated as a map. If values are not strings or objects, zero cookies are produced and detection continues. Wrap cookies in an array. Q: Does a BOM still break JSON? A: Not in this parser — stripBom runs first. If another tool still fails, re-export from here to get clean UTF-8. Q: Can the extension detect a format the website cannot? A: No. Both call @cookieman/core. The warning text is the same. --- ## Fix “Skipped invalid Netscape line” (spaces, not tabs) URL: https://cookieman.pro/guides/fix-skipped-invalid-netscape-line/ Skipped invalid Netscape line is the warning this parser emits when a row does not have seven tab-separated fields. Paste a space-separated file below: if columns 2 and 4 are TRUE/FALSE and column 5 is digits, the line is reconstructed and a warning says separators were spaces, not tabs. The rewritten output is real tabs plus the Netscape header. That is the file curl and yt-dlp want. Steps: 1. Get the broken file: Usually a cookies.txt opened in an IDE with “convert tabs to spaces” on save, or copied through a UI that collapses whitespace. 2. Paste it here: The sample is already space-separated. Convert. You should see a reconstruction warning and a valid Netscape output. 3. Replace the file on disk: Download and overwrite. Do not open it in an editor that rewrites tabs. Feed curl -b or yt-dlp --cookies. Q: Why did my editor destroy the file? A: The format requires literal U+0009 tabs. YAML/Markdown/prettier pipelines often expand them. Treat cookies.txt as binary-ish: convert here, do not pretty-print. Q: Does curl emit this exact warning? A: No. curl typically loads nothing. The wording is CookieMan’s. The cause (spaces) is the same class of bug. Q: What if only one line was skipped? A: The rest still parse. Read the warning prefix (first 60 characters of the line) to find the bad row. Fix or drop it. --- ## Fix cookies.txt expiry written in milliseconds URL: https://cookieman.pro/guides/fix-netscape-milliseconds-expiry/ A cookies.txt millisecond expiry is a 13-digit number in column 5; this parser treats any value > 1e12 as milliseconds, divides by 1000, and warns Cookie "name" expiry looked like milliseconds; converted to Unix seconds. JavaScript Date.now() is milliseconds. Netscape and chrome.cookies use seconds. JSON Array parse uses the same 1e12 threshold. Playwright’s expires: -1 is a different bug — session, not overflow. Steps: 1. Open the failing jar: If yt-dlp or curl rejects the file, look at column 5. Thirteen digits is the giveaway. Ten digits (around 1.7e9 in 2026) is correct. 2. Paste here: The sample is already milliseconds. Convert. Output Netscape with a 10-digit expiry. JSON output stores expirationDate in seconds. 3. Replace the file: Feed yt-dlp --cookies or curl -b the rewritten file. Do not convert seconds to milliseconds again in a JS snippet. Q: Will curl accept a 13-digit expiry? A: Some builds store it as a far-future date; others reject the line. yt-dlp is often strict. Rewrite to seconds. Q: Does Chrome’s cookies API use milliseconds? A: No. expirationDate is seconds. CookieMan JSON matches that. Do not multiply by 1000 when exporting for Chrome. Q: What about Max-Age on Set-Cookie? A: Max-Age is a delta in seconds, added to now. It is not a 13-digit epoch. Different field, different bug. --- ## Fix “Cookie missing domain, defaulted to localhost” URL: https://cookieman.pro/guides/fix-cookie-missing-domain-localhost/ Cookie missing domain, defaulted to localhost (and the header variant Header string format has no domain info; defaulted to localhost) means the source format cannot carry a host. Paste the header below, then edit domain in the JSON output before you import. Importing unchanged writes cookies for localhost. They will not be sent to example.com. Steps: 1. Paste the header or map: You will see the localhost warning. That is the detector working, not a crash. 2. Rewrite domains in JSON: Output is JSON Array. Change "domain": "localhost" to the API host, with a leading dot if subdomains should receive the cookie. Set hostOnly accordingly. 3. Import on that origin: Open the matching site in Chrome, CookieMan Import, Apply. Or export Netscape after the domain edit for curl. Q: Why not default domain to the current tab? A: This page has no current tab. The extension Import still uses the domains in the file; it does not rewrite them to the active origin automatically. Q: Should I use example.com or .example.com? A: A leading dot (and hostOnly: false) shares the cookie with subdomains. Host-only cookies omit the Domain attribute in the browser and should stay without a leading dot plus hostOnly: true. Q: Will Netscape export still say localhost if I forget to edit? A: Yes. curl will send those cookies only to localhost. That is why the warning exists. --- ## Fix #HttpOnly_ cookies dropped as comments URL: https://cookieman.pro/guides/fix-httponly-prefix-as-comment/ #HttpOnly_ on a Netscape domain field is curl’s HttpOnly marker, not a comment. If a script skips every line starting with #, the session cookie disappears. Paste the file here: the parser strips the prefix, sets httpOnly: true, and JSON output keeps the flag. True comments are lines that start with # but not #HttpOnly_. Those are still ignored. Steps: 1. Confirm the prefix is on the cookie line: A valid row looks like #HttpOnly_.example.com then tabs. A real comment is # This file was generated. 2. Paste into the converter: Output JSON Array should list the cookie with "httpOnly": true. Netscape output writes the prefix back — that is what curl wants. 3. Replace naive scripts: Do not grep -v "^#" a cookies.txt. Use this parser, curl, or CookieMan Import. Q: Does wget understand #HttpOnly_? A: wget’s Netscape reader accepts the same prefix curl uses. After load, HttpOnly is not a wget concept on the wire — it still sends the name=value. Q: Can I write HttpOnly as an eighth column? A: No. Extra columns are folded into the value (tab-joined) on parse. Use the prefix or JSON. Q: Why keep JSON for Chrome if the prefix round-trips? A: HttpOnly survives. SameSite and partition keys do not. Auth cookies often need more than HttpOnly. --- ## Fix SameSite=None cookies rejected without Secure URL: https://cookieman.pro/guides/fix-samesite-none-without-secure/ Chrome rejects a cookie with SameSite=None without Secure. CookieMan JSON stores None as sameSite: "no_restriction". Paste the broken object below, set secure to true in the output, and import on an HTTPS origin — the converter will not silently flip the flag for you. Netscape cannot record SameSite at all. If the only copy you have is cookies.txt, you must add None+Secure in JSON after conversion. Steps: 1. Confirm the rejection: CookieMan’s popup surfaces the browser error when save fails. DevTools Application panel simply does not show the cookie. 2. Fix the JSON here: Paste the object. In the output, set "secure": true and keep "sameSite": "no_restriction". Do not import on plain HTTP except localhost experiments. 3. Apply on HTTPS: Open the https origin, Import → Apply. Cross-site iframes still need CHIPS if the cookie is third-party — partitioned export. Q: Is localhost allowed without HTTPS? A: Chrome treats localhost as a secure context for many cookie purposes, but SameSite=None still wants the Secure attribute set. Prefer https://localhost or https://127.0.0.1 when testing None. Q: Will the converter set Secure automatically? A: No. Auto-flipping flags would hide illegal exports. You change secure, then import. Q: Does cookies.txt preserve None+Secure? A: Secure is column 4. None is not stored. Re-importing Netscape will not restore None — SameSite lost in cookies.txt. --- ## Fix __Host- cookies rejected by Chrome URL: https://cookieman.pro/guides/fix-host-prefix-cookie-rejected/ Chrome rejects a __Host- cookie unless it is Secure, Path=/, and host-only (no Domain attribute). The sample below fails all three — rewrite it to hostOnly: true, path: "/", secure: true, and a domain without a leading dot. __Secure- only requires the Secure flag. Mixing the two prefixes is a common import failure after a Netscape round-trip that added a dotted Domain. Steps: 1. Read the name prefix: If the cookie name starts with __Host- or __Secure-, Chrome’s prefix rules apply on every write, including CookieMan save and Import. 2. Fix the JSON in the converter: Paste the object. Adjust fields in the output (or in the input and reconvert). The tool does not auto-correct prefixes — illegal combinations stay illegal until you edit them. 3. Import on the exact host over HTTPS: Open https://example.com (not a subdomain if the cookie is host-only). Import → Apply. If Chrome still rejects, the popup shows the API error. Q: Can I set Domain=.example.com on a __Host- cookie if hostOnly is true? A: No. The name forbids a Domain attribute. Chrome rejects the write. Use the exact host and hostOnly: true. Q: Does this page apply the cookie to Chrome? A: No. It rewrites JSON. The extension’s Import calls chrome.cookies.set, which still enforces prefixes. Q: Why did Netscape export break my __Host- cookie? A: The serializer writes a domain field for every row. Re-importing that file is not host-only. Stay on JSON for prefixed cookies — JSON vs cookies.txt. ---