cookies.txt Converter

Convert Netscape cookie files, JSON and a request Cookie header. Values stay unchanged.

A Cookie header contains no domain, path, expiry, Secure or HttpOnly metadata. Header import creates host-only session cookies using your explicit URL/path/Secure settings, with HttpOnly=false; these are new assumptions, not recovered metadata. Header export filters domain, path, expiry and HTTPS. This utility does not model SameSite, partitioned cookies or public-suffix restrictions and is not a full browser cookie jar. Never share authentication cookies.

Netscape cookie file format: curl documentation

JSON → Netscape cookies.txt

Input

[{"domain":"example.com","includeSubdomains":false,"path":"/","secure":true,"expires":0,"name":"session","value":"demo%20value","httpOnly":true}]

Result

# Netscape HTTP Cookie File
#HttpOnly_example.com	FALSE	/	TRUE	0	session	demo%20value

Frequently Asked Questions

What is the Netscape cookies.txt format?

It is the plain-text cookie file format used by curl, wget and many download managers. Each line holds one cookie as seven TAB-separated fields: domain, include-subdomains flag (TRUE/FALSE), path, secure flag (TRUE/FALSE), expiry as a Unix timestamp (0 means a session cookie), name, and value. Lines starting with # are comments.

What does the #HttpOnly_ prefix on a line mean?

HttpOnly cookies cannot be read by browser JavaScript, so the format cannot mark them with a normal field. Instead the domain is prefixed with #HttpOnly_, for example #HttpOnly_.example.com — without the prefix the line would look like a comment. The converter parses these lines as cookies, keeps the flag, and writes the prefix back on export.

How do I convert a cookies.txt file to JSON?

Set the input format to "Netscape cookies.txt" and the output format to JSON, then press Convert. Every line becomes an object with domain, includeSubdomains, path, secure, expires (Unix seconds, 0 for a session cookie), name, value and httpOnly fields — convenient for scripts, tests and automation.

How is a Cookie request header built for a URL?

For the target URL the converter applies the RFC 6265 sending rules: the host must match the cookie domain (subdomains included when the flag is TRUE), the URL path must match the cookie path, Secure cookies are only sent over HTTPS, and already-expired cookies are skipped. Matches are ordered longest path first and joined as name=value pairs separated by "; ".

What happens when I import a Cookie header?

A Cookie header carries only names and values — no domain, path, expiry, Secure or HttpOnly metadata. Import creates host-only session cookies for the host of the target URL, using the path and Secure options you set, with HttpOnly=false. These are new assumptions, not recovered metadata.

How are Secure and expiry handled?

In cookies.txt the fourth field is the Secure flag (TRUE/FALSE); in JSON it is a boolean. When a header is built, Secure cookies are dropped unless the target URL is HTTPS. Expiry is a Unix timestamp in seconds — 0 means a session cookie — and cookies that have already expired are excluded from header output.

Are cookie values decoded, re-signed or refreshed?

No. Values are treated as opaque text and copied verbatim in every conversion; nothing is decoded, re-encoded, decrypted, re-signed or refreshed. If a name or value contains characters a Cookie header cannot carry, header export stops with an error — choose JSON output instead, which preserves such values unchanged.

Does my data leave the browser?

No. Parsing and conversion run entirely in your browser with JavaScript — no upload, no server round-trip. Still, treat cookie files as credentials: never share authentication cookies, and only inspect Cookie headers you are authorized to use.

Will the tool remember my input if I refresh or close the tab?

Yes. Whatever you paste or type is kept as a draft in your browser's local storage, and the page restores it — with the results already re-parsed — the next time you open the tool. Clearing the input erases the draft. The data never leaves your device: no account, no upload, no server-side copy. Keys and secrets you enter for verification are never saved.

Does the tool remember my options, such as the delimiter or time zone?

Yes. Choices like the CSV delimiter, the first-row-as-header switch, the preview time zone and run count are stored locally in your browser and restored on your next visit, so repeated work keeps the same setup. Nothing is uploaded — the saved settings stay on your device, and clearing your browser data resets them.

Parse and inspect security tokens including JWT, SAML, certificates, and cookies