- 1 Copy cookies out of Insomnia
From Cookie Jar or the request Headers tab, copy the
Cookieheader. If you captured responseSet-Cookielines, 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.txtand runcurl -b cookies.txt -c cookies.txt https://api.example.com/v1. Usewget --load-cookiesthe same way.
Cookie Jar vs the Cookie header
Insomnia’s jar can hold Domain, Path and Secure. The header it sends on the wire does not. If you only copy the outbound header, you throw those attributes away. Whenever the UI lets you export cookies as JSON or show Set-Cookie, use that. Header-only conversion is a last resort.
| Source you paste | Domain / flags kept? | Best output |
|---|---|---|
Request Cookie: header | No — localhost + session | JSON first, then Netscape after edits |
Response Set-Cookie lines | Yes — Domain, Path, Secure, HttpOnly, SameSite | JSON Array or Netscape |
| JSON array of cookie objects | Yes, if the export included them | Netscape for CLI, JSON for Chrome |
curl flags that match an Insomnia send
# send cookies, write any Set-Cookie back to the same file
curl -b cookies.txt -c cookies.txt https://api.example.com/v1/me
# do not use --junk-session-cookies if expiry is 0 — that flag drops them