Hero Background

Next-Gen App & Browser Testing Cloud

Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Next-Gen App & Browser Testing Cloud

Cookie Converter

Convert cookies between Netscape (cookies.txt) and JSON formats instantly. Paste, upload, or enter your cookie data and convert in seconds!

Test Your Web Or Mobile Apps On 3000+ Browsers
Signup for free...

Conversion Direction

Input (Netscape)

Output (JSON)

What is the Netscape Cookie Format?

The Netscape cookie format (also known as cookies.txt) is a tab-separated plain text format originally created by Netscape Navigator. Each line in the file represents a single cookie with seven tab-separated fields: domain, include subdomains flag, path, secure flag, expiration timestamp, cookie name, and cookie value. It is widely used by command-line tools like cURL and wget.

What is the JSON Cookie Format?

The JSON cookie format stores cookies as a structured array of objects, where each object contains properties like domain, path, secure, httpOnly, expirationDate, name, and value. This format is used by browser DevTools, automation tools like Puppeteer and Playwright, and modern web applications.

Key Differences Between Netscape and JSON Cookie Formats

FeatureNetscape (cookies.txt)JSON
StructureTab-separated plain text, one cookie per lineStructured array of objects with key-value pairs
ReadabilityModerate — requires knowledge of column orderHigh — self-documenting with named properties
Used BycURL, wget, browser extensions, web scrapersBrowser DevTools, Puppeteer, Playwright, Selenium
File Extension.txt.json
FlexibilityFixed column structure, limited extensibilityEasily extensible with additional properties

How Do I Convert Cookies?

  • Select Conversion Direction: Choose whether you want to convert from Netscape to JSON or from JSON to Netscape using the direction toggle buttons.
  • Provide Cookie Input: Enter your cookie data by pasting it directly, uploading a file, or loading from a URL. You can also click the sample button to load example data.
  • Convert Your Data: The "Auto Update" feature processes your input in real-time as you type. If you prefer manual conversion, disable "Auto Update" and click the "Convert Cookies" button.
  • Export or Copy Results: After conversion, download the output file or copy it to your clipboard with a single click.

Use Cases of Cookie Conversion

  • Web Scraping & Automation: Export cookies from your browser in JSON format and convert them to Netscape for use with cURL or wget in automated scraping scripts.
  • API Testing with cURL: Copy cookies from Chrome DevTools (JSON) and convert to Netscape format to authenticate cURL requests against APIs that require session cookies.
  • Browser Automation: Convert Netscape cookies from legacy tools to JSON format for use with modern automation frameworks like Puppeteer, Playwright, or Selenium.
  • Session Transfer: Move authenticated sessions between different tools and platforms by converting cookies to the required format.
  • Debugging & Development: Quickly inspect and restructure cookie data during development and debugging of web applications.

Frequently Asked Questions (FAQs)

What is the Netscape cookie format?

The Netscape cookie format (cookies.txt) is a tab-separated text format where each line represents a cookie with seven fields: domain, include subdomains flag, path, secure flag, expiration (Unix timestamp), name, and value. It was created by Netscape Navigator and is still widely used by tools like cURL and wget.

How do I use converted cookies with cURL?

After converting your cookies to Netscape format, save the output as a .txt file (e.g., cookies.txt). Then use it with cURL: curl -b cookies.txt https://example.com. The -b flag tells cURL to load and send cookies from the specified file.

Can I convert cookies in both directions?

Yes! This tool supports bi-directional conversion. You can convert from Netscape to JSON and from JSON to Netscape by switching the conversion direction using the toggle buttons above the input area.

What tools use the JSON cookie format?

JSON cookies are used by browser DevTools (Chrome, Firefox), browser automation tools like Puppeteer and Playwright, testing frameworks like Selenium, and various browser extensions like EditThisCookie.

Are my cookies safe when using this tool?

Yes, all conversion happens entirely in your browser. Your cookie data is never sent to any server. The conversion is performed client-side using JavaScript, ensuring your sensitive cookie data remains private.

Did you find this page helpful?

More Tools

... Code Tidy
... Data Format
... Random Data
... Hash Calculators
... Utils
ShadowLT Logo

Start your journey with TestMu AI

Get 100 minutes of automation test minutes FREE!!