3 min read

Convert Insomnia cookies to Netscape 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.

Insomnia cookiesInsomnia cookie jarInsomnia to cookies.txtInsomnia curl
  1. 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. 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. 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.

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

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 pasteDomain / flags kept?Best output
Request Cookie: headerNo — localhost + sessionJSON first, then Netscape after edits
Response Set-Cookie linesYes — Domain, Path, Secure, HttpOnly, SameSiteJSON Array or Netscape
JSON array of cookie objectsYes, if the export included themNetscape for CLI, JSON for Chrome
Same rewrite works for HTTPie sessions. See HTTPie session cookies from JSON if the file already has domains.

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
          

Questions people ask

Can CookieMan read my Insomnia cookie jar from disk?
No. Paste the header, Set-Cookie lines or JSON. The converter never opens Insomnia’s application data directory.
Why does curl ignore the cookies.txt I just saved?
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.
Does Insomnia speak Netscape natively?
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.
3 min read

Postman Cookie Header to JSON

Paste a Postman Cookie header and turn name=value pairs into a JSON array. Domains default to localhost until you set them — then import or send via curl.

Postman cookiesPostman Cookie header 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
3 min read

HTTPie Session Cookies from JSON

Convert a JSON cookie export into a Cookie header for httpie -A or a Netscape jar for curl-compatible sessions. Domains must be real hosts, not localhost.

HTTPie cookieshttpie session 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