- 1 Export cookies from Chrome
Open the site in Chrome, export JSON from CookieMan (current site). Alternatively paste an existing Netscape dump — it will be normalised (tabs, header, seconds).
- 2 Convert to Netscape here
Paste the export. Output is cookies.txt. Check that HttpOnly session cookies appear with
#HttpOnly_and that expiry is 10 digits, not 13. - 3 Pass the file to yt-dlp
Save as
cookies.txtand runyt-dlp --cookies cookies.txt URL. Keep the file out of git. When finished, delete it and rotate the site session if it was privileged.
yt-dlp cookie flags that matter
| Flag | When to use it | What this converter does |
|---|---|---|
--cookies FILE | You already have a Netscape file | Writes that file from JSON or repairs a broken dump |
--cookies-from-browser chrome | yt-dlp can see your local profile | Nothing — that bypasses the file |
--no-cookies-from-browser | CI, or you must use the file | Use the file this page produced |
yt-dlp --cookies cookies.txt "https://www.example.com/watch?v=..."
# youtube-dl uses the same Netscape reader:
# youtube-dl --cookies cookies.txt URL
What yt-dlp will not read
- JSON arrays — it wants Netscape, not CookieMan JSON.
- Space-separated columns — tabs only, unless you repair the file here first.
- A leading UTF-8 BOM on some builds — the converter strips BOM on paste.
- CHIPS
partitionKey— not in the format; partitioned cookies will not appear in a Netscape dump.