Other Tools
Cookie Header & Set-Cookie Converter
Parse Cookie request headers or Set-Cookie response headers into JSON and Netscape cookies.txt, or generate headers from cookie exports. Conversion runs locally in your browser.
Cookie request headers do not contain a domain. Add one when creating JSON or Netscape files for a specific site; Netscape output requires it.
Supported cookie formats
JSON cookies
Browser or extension exports represented as cookie objects.
[{"domain":"example.com","name":"session","value":"abc"}]Netscape cookie file
Tab-separated cookies.txt format used by curl, wget and automation tools.
.example.com TRUE / TRUE 0 session abcCookie Header
The Cookie request header sent from a browser to a server.
Cookie: session=abc; theme=darkSet-Cookie headers
One or more Set-Cookie response headers with cookie attributes.
Set-Cookie: session=abc; Path=/; Secure; HttpOnlyConvert Cookie headers and Set-Cookie to JSON
Cookie data appears in several incompatible formats. Browser extensions often export JSON, command-line tools use Netscape cookies.txt, HTTP requests send a Cookie header, and servers return one or more Set-Cookie headers. This converter handles all four formats locally in your browser.
For a direct cookies.txt ↔ JSON file conversion, use the dedicated Netscape to JSON converter. Use this page when your input or output includes HTTP cookie headers.
Supported Conversions
- JSON cookie objects
- Netscape HTTP Cookie File
- Cookie request headers
- Set-Cookie response headers
Choose a source and target format, or let the tool detect the input automatically. You can paste text or upload a .json, .txt or .cookies file, then copy or download the result.
Cookie Header to JSON: step by step
- Select Cookie Header as the source and JSON cookies as the target.
- Paste
Cookie: session=demo; theme=dark. - Enter
example.comas the default domain. A request header does not identify the cookie domain. - Click Convert cookies, inspect the two resulting cookies, then copy or download the JSON.
The supplied domain is an assumption you provide. Missing path, expiry and security attributes cannot be recovered from the request header.
Set-Cookie to JSON
Select Set-Cookie headers as the source. Paste each response header on its own line, then choose JSON as the target. Supply a default domain if the response header omits Domain. Do not combine multiple Set-Cookie lines with commas: an Expires date may itself contain a comma.
Domain and Attribute Handling
A Cookie request header contains only names and values. It does not contain domain, path, expiry, Secure, HttpOnly or SameSite attributes. Enter a default domain when converting this format to a browser JSON export or Netscape file. Netscape output requires a domain.
Converting to Cookie Header intentionally removes attributes that cannot be represented by that format. JSON, Netscape and Set-Cookie outputs preserve supported attributes whenever the source provides them.
Examples
Cookie: session=abc123; theme=dark
Set-Cookie: session=abc123; Domain=.example.com; Path=/; Secure; HttpOnly; SameSite=Lax
[
{
"domain": ".example.com",
"name": "session",
"value": "abc123",
"path": "/",
"secure": true,
"httpOnly": true
}
]
Privacy
Cookie content is parsed and converted in the current browser. It is not uploaded to ToolMi. Even so, avoid sharing live authentication cookies with other people and revoke exposed sessions immediately.
Frequently Asked Questions
Why is a domain required for Netscape output?
Every Netscape cookie row includes a domain field, while a Cookie request header does not. Supply the website domain before converting.
Why are attributes missing from Cookie Header output?
The HTTP Cookie request header supports only name=value pairs. Attributes such as HttpOnly and SameSite belong to Set-Cookie responses.
Is Cookie the same as Set-Cookie?
No. A request Cookie header sends name/value pairs to a server. A response Set-Cookie header describes a cookie and may include Path, Domain, Secure, HttpOnly, SameSite and expiry attributes. Choosing the correct source prevents attributes from being mistaken for separate cookies.
Will converting through another format keep every attribute?
No. Cookie headers cannot store attributes, and Netscape files have no standard SameSite field. Converting that output back to JSON cannot restore omitted information. Keep your original export if those fields matter.