- 1 Get the broken file
Usually a cookies.txt opened in an IDE with “convert tabs to spaces” on save, or copied through a UI that collapses whitespace.
- 2 Paste it here
The sample is already space-separated. Convert. You should see a reconstruction warning and a valid Netscape output.
- 3 Replace the file on disk
Download and overwrite. Do not open it in an editor that rewrites tabs. Feed curl
-bor yt-dlp--cookies.
Message → cause → fix
| Message | Cause | Fix |
|---|---|---|
Skipped invalid Netscape line: … | Fewer than 7 tab fields and the space-pattern did not match | Restore tabs; keep TRUE/FALSE uppercase; keep seven columns |
Reconstructed Netscape line for "name" — separators were spaces, not tabs | Space-separated but pattern matched | Already fixed — download the tabbed output |
| No cookies, file looks fine | All lines start with # and are not #HttpOnly_ | Those are comments — see HttpOnly prefix guide |
Canonical line after repair
# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
.example.com TRUE / TRUE 1789200000 session_id abc123