Cookie Converter

Netscape cookies.txt and cookie JSON, in both directions. Nothing leaves your browser.

Direction
0 cookies converted
Cookies are login credentials. This page converts them in your browser and sends nothing anywhere — but treat the file itself like a password, and never paste one into a tool that does upload it.

About the Cookie Converter

Cookies get stored in two shapes and the tools you use disagree about which one they want. Command-line programs — yt-dlp, curl, wget, most scrapers — read the old Netscape cookies.txt format: seven tab-separated fields per line, no quotes, no structure. Browser extensions like Cookie-Editor and EditThisCookie speak JSON instead. So you export from one and it will not load in the other, and hand-editing tabs in a text file is exactly as pleasant as it sounds. This converts between the two, both ways, and tells you if a line was malformed rather than dropping it quietly.

How to use it

  1. 1Pick your direction: cookies.txt to JSON, or JSON back to cookies.txt.
  2. 2Paste the file in, or hit Load a file to read it off your disk. Comment lines and blank lines are handled for you.
  3. 3Copy the result, or download it as cookies.json / cookies.txt ready to hand to the next tool.

Why use it

Gets httpOnly right
In cookies.txt an httpOnly cookie is marked by a #HttpOnly_ prefix on the domain, not by a field. Converters that treat those lines as comments drop your session cookies entirely — that is the usual reason a re-imported login does not work.
Both directions
Export from an extension and feed it to yt-dlp, or take a cookies.txt from a CLI tool and load it into your browser. Most converters only do the first half.
Tells you what it skipped
Malformed lines are counted and named with their line number, so a file that half-converts does not look like a file that fully converted.
Never uploaded
A cookie file is a live login. This runs as JavaScript in your tab — check your network panel, there is no request. That is the whole reason to prefer it over a server-side converter.

FAQ

What are the seven fields in cookies.txt?

In order, separated by real tab characters: domain, an include-subdomains flag (TRUE or FALSE), path, a secure flag (TRUE or FALSE), the expiry as a Unix timestamp, the cookie name, and the cookie value. A timestamp of 0 means it is a session cookie that dies when the browser closes.

Where does httpOnly live in cookies.txt?

There is no field for it. The convention, which curl and yt-dlp both follow, is to prefix the line's domain with #HttpOnly_. Because that starts with a hash, naive parsers throw the line away as a comment. This tool reads the prefix on the way in and writes it back on the way out.

Why does my converted file not work with yt-dlp?

Almost always tabs. If the file went through a text editor, a spreadsheet or a chat window, the tabs may have become spaces and every line is then unparseable. Download the result here rather than copy-pasting it, and do not open it in anything that reformats whitespace. Second most common cause: the cookies have simply expired.

How do I get a cookies.txt in the first place?

Use a browser extension that exports it — Cookie-Editor can export either format directly. yt-dlp can also read cookies straight out of your browser with its --cookies-from-browser flag, which skips the file entirely and is worth trying first.

Is it safe to paste cookies here?

This page does not upload them, and you can verify that in your browser's network tab. But be clear about what the file is: anyone holding it can act as you on those sites, without your password and often without triggering a login alert. Keep it local, delete it when you are done, and log out of the account afterwards to invalidate the session.

What is the sameSite value in the JSON output?

It is set to no_restriction, which is the most permissive option and what most extensions default to on import. Netscape cookies.txt has no sameSite field at all, so there is nothing in the source file to preserve — if a specific site needs lax or strict, set it in your cookie editor after importing.