Netscape to JSON & JSON to Netscape Cookie Converter

Convert Netscape cookies.txt to JSON, or turn a JSON cookie export into cookies.txt. Paste content or open a file, choose a direction, then copy or download the result. Everything runs in your browser.

Private by design:cookie data stays in this browser and is never uploaded to our server.

Format guide

Netscape format

One cookie per line, with fields separated by tabs:

domain flag path secure expiration name value

JSON format

A standard JSON array containing cookie objects:

[{"domain":"...","name":"...","value":"..."}]

Netscape to JSON and JSON to Netscape

Convert Netscape HTTP Cookie File content to JSON, or turn a JSON cookie export into a Netscape-compatible text file. Processing happens locally in your browser.

For Cookie: name=value request headers or Set-Cookie responses, use the Cookie Header & Set-Cookie Converter. This page focuses on cookie files in the two formats below.

How to use

  1. Leave Auto-detect selected, or choose a conversion direction.
  2. Paste cookie content or upload a .txt, .cookies, or .json file.
  3. Conversion updates as you enter content. Review the detected format, cookie count, and validation messages; the Convert button also runs the conversion.
  4. Copy the result or download it as cookies.json or cookies.txt.

Supported input

  • Netscape rows with seven tab-separated fields.
  • #HttpOnly_ Netscape cookie rows.
  • A JSON array of cookie objects.
  • A single JSON cookie object.
  • A JSON object containing a cookies array.

Required JSON fields are domain and name. Common fields such as value, path, secure, hostOnly, httpOnly, expirationDate, expiration, and expires are recognized.

Netscape field order

domain    includeSubdomains    path    secure    expiration    name    value

The second and fourth fields use TRUE or FALSE. Expiration is a Unix timestamp; 0 represents a session cookie in many tools.

Conversion examples

The examples use dummy cookies. Copy the content from the code blocks; Netscape fields are separated by actual tab characters, not spaces.

Netscape to JSON

Input:

.example.com	TRUE	/	TRUE	1735689600	session_id	abc123

Output:

[
  {
    "domain": ".example.com",
    "hostOnly": false,
    "path": "/",
    "secure": true,
    "expirationDate": 1735689600,
    "name": "session_id",
    "value": "abc123"
  }
]

JSON to Netscape

Input:

{"domain":"example.com","name":"theme","value":"dark","path":"/","secure":false}

Output:

example.com	FALSE	/	FALSE	0	theme	dark

Field mapping

Netscape field JSON field Notes
Domain domain A leading dot commonly includes subdomains.
Include subdomains hostOnly The meanings are inverse: Netscape TRUE becomes hostOnly: false.
Path path Defaults to / when missing in JSON.
Secure secure Only send the cookie over HTTPS when true.
Expiration expirationDate expiration and expires are also accepted on JSON input.
Name name Required.
Value value Empty values are supported.

Compatibility notes

  • #HttpOnly_domain rows are preserved as httpOnly: true and restored when converting back.
  • Netscape has no standard field for SameSite, priority, partition keys, or browser store IDs. Those fields cannot be represented in Netscape output.
  • Session cookies usually use expiration 0; importing behavior can vary between applications.
  • Cookie values containing tabs or line breaks cannot be represented safely in the tab-separated Netscape format.
  • Always review cookies before importing them into a browser or automation environment.

Common uses

  • Prepare a cookie file for command-line tools that accept the Netscape cookie-jar format.
  • Inspect browser-extension JSON exports or prepare test fixtures. Check the destination schema separately; browser automation APIs may use different field names and requirements.
  • Inspect cookie domains, paths, expiration values, and security flags in readable JSON.
  • Normalize a cookie export before moving it between approved development or testing environments.

Privacy and safety

Cookie data can contain active session credentials. This converter does not upload input or output, but you should still avoid sharing converted files or pasting them into untrusted services. Only import cookies that you own or are authorized to use.

Frequently asked questions

Why was hostOnly reversed?

The second Netscape field means “include subdomains,” while JSON hostOnly means the opposite.

Why did some JSON fields disappear?

Netscape stores only seven core fields. Browser-specific properties such as sameSite have no standard Netscape column.

Does this tool log or upload cookies?

No. Parsing, validation, conversion, and file generation run in the browser.

Why is a line reported as invalid?

Each Netscape cookie row needs seven tab-separated fields, valid TRUE/FALSE flags, and a non-negative integer expiration value.

Can I paste a Cookie request header here?

A header such as Cookie: session=demo; theme=dark is not a Netscape cookie file. Use the header converter and supply the domain when producing JSON or Netscape output. The original header does not contain that domain.

Can I import this JSON directly into any browser or automation library?

No universal cookie JSON schema exists. This output uses fields such as expirationDate and hostOnly. Review the destination's expected fields before importing; conversion does not validate whether a session is active.