- 1 Dump cookies from Puppeteer
JSON.stringify(await page.cookies())after the page has set them. Newer Puppeteer also hasbrowser.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, orcurl -b cookies.txt. You must be on a matching origin beforesetCookie.
Puppeteer CookieParam fields
| Puppeteer | After parse | Dropped on Netscape export? |
|---|---|---|
name, value, domain, path | kept | No |
expires Unix seconds | expirationDate | No |
expires: -1 | session | Written as 0 |
httpOnly, secure | kept | HttpOnly → prefix; Secure → column 4 |
sameSite | kept in JSON | Yes — no Netscape column |
size, session (boolean) | ignored extras | Yes |
partitionKey (if present) | kept in JSON when topLevelSite exists | Yes on Netscape |
const cookies = await page.cookies();
console.log(JSON.stringify(cookies, null, 2));
// after converting to JSON Array in the tool:
await page.setCookie(...JSON.parse(fs.readFileSync("cookies.json", "utf8")));
{ "cookies": [...] }, it is treated as storageState and unwrapped. See Playwright storageState. setCookie origin rules still apply
Puppeteer talks to Chrome. SameSite=None still requires secure: true. __Host- still forbids domain. The converter will not make Chrome accept an illegal cookie — SameSite=None without Secure.