The free way to download a whole YouTube playlist or an entire channel in 2026 is yt-dlp: point it at a playlist URL or a channel's @handle and it walks the list for you. Paste a URL below to get the command for the basic case, then read on for the bulk-specific flags (an archive file so re-runs skip what you already have, output templates for sane folders, item ranges, and rate limiting):
Paste a YouTube URL, choose what to grab, and copy the command. It updates as you change the options.
Resolution is a maximum, not a guarantee. yt-dlp grabs the best quality at or below your pick, capped by what was actually uploaded. Choose 8K on a 720p video and you get 720p, not an error and not an upscale.
yt-dlp --merge-output-format mp4 "https://www.youtube.com/playlist?list=PLBCF2DAC6FFB574DE"Paste this into your terminal AI and it runs the command for you, installing the tool first if you do not have it. Works with Claude Code, OpenAI Codex CLI, Gemini CLI, GitHub Copilot CLI, Aider, Cursor Agent, Warp, OpenCode, Cline and any other CLI coding agent.
Goal: download the video from this YouTube link.
Run this command in my shell:
yt-dlp --merge-output-format mp4 "https://www.youtube.com/playlist?list=PLBCF2DAC6FFB574DE"
First check whether `yt-dlp` is installed (run `command -v yt-dlp`). If it is not, install it with my system's package manager before running anything: macOS `brew install yt-dlp ffmpeg`, Debian/Ubuntu `sudo apt install yt-dlp ffmpeg`, Fedora `sudo dnf install yt-dlp ffmpeg`, Windows `winget install yt-dlp ffmpeg`. Then run the command above.
Show me any command that needs sudo before you run it, tell me where the output file landed when you are done, and do not run anything else.You run this at your own risk. An AI agent can execute commands on your machine; review what it does before approving. TechEarl is not liable for the outcome, see the Terms of Service.
The builder covers the single-command case. The rest of this page is the part that actually matters for bulk grabs: making the job resumable so you can re-run it next week and only pull the new uploads, keeping the files organized, and not getting throttled halfway through a 500-video channel.
If you have used youtube-dl, yt-dlp is its actively maintained successor. youtube-dl (originally by Ricardo García, "rg3") still exists but is effectively unmaintained and breaks whenever YouTube changes its player; yt-dlp is the community fork that keeps up, with a faster release cadence and far more extractors. Review yt-dlp's compatibility notes when adapting older youtube-dl commands; defaults are not identical.
Download only what you have the right to. Saving your own uploads, Creative Commons material, or content the rights holder permits is one thing; bulk-downloading and redistributing copyrighted video is another, and mass downloading explicitly violates YouTube's Terms of Service. Pulling an entire channel is exactly the kind of activity that gets noticed. This guide is for the legitimate cases. What you do with the files is on you.
Preview, test one item, then resume the playlist
Replace PLAYLIST_URL with your own playlist URL. These are three separate steps, not one command to paste and leave unattended. First confirm your yt-dlp, ffmpeg, and JavaScript runtime setup using the yt-dlp command reference.
Preview the visible entries without downloading the media:
yt-dlp --flat-playlist --print "%(playlist_index)s %(id)s %(title)s" "PLAYLIST_URL"Test one entry and check its audio, picture, and filename:
yt-dlp --playlist-items 1 --download-archive playlist-video-archive.txt -o "%(playlist_title)s/%(playlist_index)03d - %(title)s [%(id)s].%(ext)s" "PLAYLIST_URL"Then remove the item limit to continue:
yt-dlp --download-archive playlist-video-archive.txt --sleep-requests 1 -o "%(playlist_title)s/%(playlist_index)03d - %(title)s [%(id)s].%(ext)s" "PLAYLIST_URL"Wait for the command to finish and inspect errors before assuming the playlist is complete. Private or deleted entries may be absent from the preview or fail later. Keep the archive in the same location on reruns. It records successful IDs, not a backup inventory: deleting a media file does not remove its ID from the archive. Use separate archives for video and audio exports if you want both formats for the same IDs.
Output templates above are for an interactive shell. In a Windows .bat file, yt-dlp's percent signs need doubling (%%). The official output-template reference documents that distinction.
Download a whole playlist
Point yt-dlp at the playlist URL and it downloads every video in it, in order:
yt-dlp "https://www.youtube.com/playlist?list=PLAYLIST_ID"Quote the URL. A playlist link often carries & characters that your shell will otherwise treat as "run this in the background," and you will end up downloading one video or nothing at all.
Download an entire channel
A channel is just a big implicit playlist. Give yt-dlp the channel's @handle URL and it enumerates the supported, accessible channel tabs:
yt-dlp "https://www.youtube.com/@channelhandle"Unavailable, private, or restricted entries may not be downloadable. If you want only one of a channel's tabs (just the regular videos, or just the Shorts, or just the live streams), append the tab to the URL: .../@channelhandle/videos, .../@channelhandle/shorts, .../@channelhandle/streams. The bare handle gives you the lot.
Two warnings before you run this on a large channel. First, it can be hundreds of gigabytes, so check the size of what you are about to pull. Second, hammering YouTube for hundreds of videos back to back is the fastest way to trip the bot wall, which is what the archive file and rate limiting below are for.
The download archive: make re-runs incremental
This is the real reason to read past the first command. A --download-archive file records the ID of every video yt-dlp successfully downloads. On the next run against the same playlist or channel, it reads that file and skips anything already in it, so you only pull the new uploads:
yt-dlp --download-archive archive.txt "https://www.youtube.com/@channelhandle"Run it today and it downloads everything. Run it again against the same channel and it skips IDs in the archive. Enumeration can still take time, and previously missed older videos may be downloaded too; the archive tracks IDs, not a publication-date cutoff. This is what turns "download a channel" into "keep a local mirror of a channel" with a single repeatable command (drop it in a cron job and you have an unattended subscription).
It also makes an interrupted job safe to resume. If a 300-video download dies at video 180, re-running the exact same command picks up where it left off instead of starting over, because the first 180 IDs are already in the archive. Keep one archive file per channel or per library; the file is just plain text, one extractor-and-ID line per video, and you can edit it by hand if you ever want to force a re-download.
Organize the output into clean folders
By default yt-dlp dumps everything into the current directory with the video ID in the filename. An output template (-o) gives you a readable structure. This one creates a folder per playlist and prefixes each file with its position in the list, so the videos sort in playlist order:
yt-dlp -o "%(playlist_title)s/%(playlist_index)s - %(title)s.%(ext)s" "URL"The %(...)s tokens are output-template fields. %(playlist_title)s becomes the folder name, %(playlist_index)s is the position; use %(playlist_index)03d for explicit three-digit padding, %(title)s is the video title. There are dozens more (%(uploader)s, %(upload_date)s, %(channel)s), so you can build whatever hierarchy suits your library, for example %(channel)s/%(upload_date)s - %(title)s.%(ext)s to file a channel's videos by date. yt-dlp sanitizes titles into safe filenames automatically.
Download a range of a playlist, not all of it
You do not have to take the whole list. --playlist-items selects exactly which entries to pull. The common case is "just the first ten":
yt-dlp --playlist-items 1-10 "PLAYLIST_URL"The selector is flexible: 1-10 is a range, 1,3,5 is a set, 5: is "from item 5 to the end," :20 is "the first 20," and you can combine them (1-3,7,10-12). Negative indices count from the end, so -5: grabs the last five videos. Pair this with the archive file when you are topping up a partially-downloaded list.
The 720p trap applies here too
If your downloads come back at 720p, that is the same -f best problem covered in detail on the single-video guide, and it bites just as hard in bulk. -f best only matches a single already-combined stream, and YouTube caps those at around 720p; you need a bestvideo+bestaudio selector and ffmpeg installed so it can merge the higher-resolution halves. The builder above uses the right selector by default. For the full explanation of why this happens and how the format selector works, see how to download a YouTube video in any quality, which is the flagship for format selection.
Be polite on big channels (rate limiting)
Pull a few hundred videos as fast as your connection allows and YouTube will start returning Sign in to confirm you're not a bot or throttling you to a crawl. Two flags can reduce request pressure, without guaranteeing that restrictions disappear: -r (--limit-rate) caps your download speed, and --sleep-requests adds a pause between metadata requests so the access pattern looks less like a script:
yt-dlp -r 3M --sleep-requests 1 --download-archive archive.txt "URL"-r 3M limits to 3 MB/s; --sleep-requests 1 waits one second between requests. For a genuinely large job you can also add --sleep-interval 5 --max-sleep-interval 15 to randomize the gap between downloads (not just metadata requests), which adds a delay between media downloads. It is slower, but a slow job that finishes beats a fast one that gets your IP rate-limited at video 60. If restrictions persist, stop repeated retries and inspect the current extractor guidance. A cookie session is not a guaranteed fix.
Members-only or restricted content
For members-only videos, age-restricted uploads, or anything you have legitimate access to behind a login, hand yt-dlp your browser's cookies so the request carries your session:
yt-dlp --cookies-from-browser firefox "URL"Use a browser and profile supported on your operating system. Chromium cookie extraction can fail on Windows because of app-bound encryption; that is not a blanket limitation for Chrome on every platform. Firefox is another supported option, not a guarantee against login or bot restrictions. Use only an account authorized to access the content and keep exported cookies private. Check the yt-dlp cookie guidance.
FAQ
Point yt-dlp at the channel's handle: yt-dlp "https://www.youtube.com/@channelhandle". Unavailable, private, or restricted entries may not be downloadable. Add --download-archive archive.txt so re-runs only fetch new videos, and rate-limit with -r 3M --sleep-requests 1 on large channels to avoid the bot wall.
Use a download archive: yt-dlp --download-archive archive.txt URL. yt-dlp records every successfully downloaded video's ID in that file and skips anything already listed on the next run, so re-running against the same playlist or channel only pulls new uploads. It also makes an interrupted job safe to resume.
Use --playlist-items. --playlist-items 1-10 grabs the first ten, 1,3,5 grabs a set, 5: grabs from item 5 onward, and -5: grabs the last five. You can combine ranges and sets in one selector.
You are likely using -f best, which only matches a single combined stream that YouTube caps at ~720p. Use a bestvideo+bestaudio selector and install ffmpeg so the higher-resolution video and audio streams can be merged. See download a YouTube video in any quality for the full format-selection explanation.
Yes. yt-dlp is free and open source with no ads, paywall, or download limits, and it runs entirely on your own machine. The bulk features (download archive, output templates, item ranges, rate limiting) are all built in at no cost.
For content your account can access, use a supported browser profile, for example yt-dlp --cookies-from-browser firefox URL. Cookie extraction depends on the browser and operating system; Windows Chromium encryption can prevent it. Cookies do not guarantee access to every video or bypass every restriction.
See also
- How to download a YouTube video in any quality: the single-video flagship, with the full format-selection and 720p-trap explanation.
- Download YouTube audio: extract audio to M4A, Opus, or MP3, which combines well with a playlist for making an album.
- yt-dlp cheat sheet: every flag worth knowing, including the playlist and archive options, in one reference.
Sources
Authoritative references this article was fact-checked against.





