The fast, free way to download YouTube audio in 2026 is yt-dlp, a free, open-source command-line downloader. Paste a URL below, leave the type on Audio, pick a format, and copy the command:
Paste a YouTube URL, choose what to grab, and copy the command. It updates as you change the options.
yt-dlp -f "bestaudio[ext=m4a]/bestaudio" -x --audio-format m4a --audio-quality 0 --embed-thumbnail --embed-metadata "https://www.youtube.com/watch?v=dQw4w9WgXcQ"The one decision that matters: what format. The modern default is M4A (the AAC track YouTube serves) or Opus (the other native stream), because each can be saved with no re-encode as long as you ask for the format YouTube actually sent, so you keep the original quality exactly. MP3 is here too, because "youtube to mp3" is still what a lot of people search for, but it forces a lossy re-encode and should be reserved for a device that genuinely cannot play anything else. The rest of this page is the detail: what -x does, the one selector that decides whether you copy or re-encode, why ffmpeg is the part that trips people up, and how to tag the file properly.
If you have used youtube-dl before, yt-dlp is its actively maintained successor. youtube-dl (originally written 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. Every youtube-dl audio command below works as yt-dlp with better results.
Download only audio you have the right to. Saving your own uploads, Creative Commons tracks, podcasts, or material the rights holder permits is fine; ripping copyrighted music to redistribute is not, and bulk downloading can violate YouTube's Terms of Service. This guide is for the legitimate cases. What you do with the file is on you.
Install yt-dlp (and ffmpeg, the part that actually matters here)
For audio, ffmpeg is not optional: yt-dlp shells out to it for every extraction and every format conversion. The single most common "audio download failed" report is a missing ffmpeg, not a yt-dlp bug.
Pick your OS for the install command.
# Cross-platform and always current:
pipx install yt-dlp
sudo apt install ffmpeg # or your distro's package managerYouTube changes often enough that a stale yt-dlp simply stops working, so keep it current: yt-dlp -U for the standalone binary, pipx upgrade yt-dlp for the pipx install, brew upgrade yt-dlp on macOS. When an extraction suddenly fails, updating is the first thing to try.
Extract the audio (the recommended commands)
-x (short for --extract-audio) tells yt-dlp to pull only the audio track and throw the video away. Here is what to actually run, best option first.
# Recommended: M4A/AAC, no re-encode, best quality
yt-dlp -f "bestaudio[ext=m4a]/bestaudio" -x --audio-format m4a "URL"This is the one to reach for. The detail that almost every tutorial skips: --audio-format only sets the conversion target, it does not pick which stream gets downloaded. Left to itself, yt-dlp's bestaudio usually grabs YouTube's Opus stream (it ranks Opus above AAC), and then ffmpeg has to re-encode Opus into AAC to satisfy m4a, which is a lossy conversion you did not want. The -f "bestaudio[ext=m4a]/bestaudio" selector fixes that: it asks for the AAC-in-M4A stream first, so yt-dlp copies it verbatim (acodec copy, no transcode), and only falls back to whatever audio exists if a particular video has no m4a track. When the source already is M4A, yt-dlp logs "Not converting audio ... already is in target format" and nothing is degraded.
# Tagged file with cover art + metadata
yt-dlp -f "bestaudio[ext=m4a]/bestaudio" -x --audio-format m4a --embed-thumbnail --embed-metadata "URL"For a music library, this is the version you want: --embed-thumbnail writes the video thumbnail in as cover art and --embed-metadata fills in title, artist, and the rest of the tags from YouTube's data, so the file shows up correctly in your player.
# Opus (smallest for the quality)
yt-dlp -f "bestaudio[ext=webm]/bestaudio" -x --audio-format opus "URL"Opus is the other native YouTube format and gives you the smallest file at a given quality. YouTube ships Opus inside a WebM container, so selecting bestaudio[ext=webm] hands yt-dlp the Opus stream it can copy without re-encoding. Use it when storage or bandwidth matters and every device you care about supports it (modern phones, browsers, and most desktop players do).
# MP3 only if a device demands it (this re-encodes, losing a little quality)
yt-dlp -x --audio-format mp3 --audio-quality 0 "URL"This is the legacy path. YouTube does not serve MP3, so yt-dlp has to re-encode from the already-lossy AAC or Opus source, which means a second round of lossy compression. The drop is small at --audio-quality 0, but it is real, so only do this for an old car stereo, a basic MP3 player, or some other device that truly cannot handle M4A or Opus. For everything else, M4A is the better "youtube to mp3" answer.
A whole playlist, or a long mix split by track
Point the same command at a playlist URL and yt-dlp walks every entry:
# A whole playlist to audio
yt-dlp -f "bestaudio[ext=m4a]/bestaudio" -x --audio-format m4a "PLAYLIST_URL"For a long DJ set, podcast, or compilation that has YouTube chapters, --split-chapters cuts it into one file per chapter instead of a single giant file:
# Long DJ mix / podcast split by chapters
yt-dlp -f "bestaudio[ext=m4a]/bestaudio" -x --audio-format m4a --split-chapters "URL"For the full bulk workflow (an archive file so re-runs skip what you already grabbed, output templates, rate limiting), see download a YouTube playlist or channel.
Why M4A/Opus beats MP3 here
The short version: you cannot add quality back, so do not throw any away. YouTube's source audio is already lossy AAC or Opus. When you ask for the format that matches the stream (the bestaudio[ext=m4a] / bestaudio[ext=webm] selectors above), yt-dlp copies that stream verbatim, so the output is bit-for-bit the audio YouTube sent. Converting to MP3 decodes that lossy audio and re-encodes it with a different lossy codec, stacking a second generation of loss on top of the first. The difference is usually subtle, but it is never an improvement, and the MP3 file is typically larger than the Opus one at comparable quality. MP3's only remaining advantage is universal playback on very old hardware. That is the whole case for it, and it is why this article is audio-first, not mp3-first.
FAQ
See also
- Download a YouTube video (any quality): the full video workflow, resolution selection, and the bot-check fix.
- Download a YouTube playlist or channel: bulk audio with
--download-archiveand output templates. - Extract a YouTube video's transcript or captions: pull the subtitles as plain text when you want the words, not the sound.
- yt-dlp cheat sheet: every flag worth knowing, in one reference.
Sources
Authoritative references this article was fact-checked against.





