Mr Lim

How to download YouTube to MP3

Or more precise, how to do so without accessing 3rd-party websites such as

The method I’ll be walking through in this post is enabled by the free and brilliant youtube-dl command-line program. For the non-nerds, they have a Windows executable which should make it easy enough to figure out (haven’t tried personally).

While setting it up for my non-nerdy SO, I realised how intimidating a command-line program was to the general population. So decided to share a quick tutorial on how to make this process as simple and straightforward as possible on the macOS.

  1. Install Homebrew. Paste the following into the Terminal and press enter.
  2. /usr/bin/ruby -e "$(curl -fsSL"

  3. Install youtube-dl. Paste the following into the Terminal and press enter.
  4. brew install youtube-dl

  5. Open your text editor. Paste the following into the text editor and save it as youtube-dl.conf.
  6. -x
    --audio-format mp3
    -o ~/Downloads/%(title)s.%(ext)s

  7. In the Finder window, press ‘CMD + SHIFT + G’ and paste the following to go to the folder.
  8. ~/.config/

  9. Move the youtube-dl.conf file to this folder.
  10. You’re done!

Next time you want to download a YouTube video as MP3, just launch the terminal and type the following;


Of course, replace the above YouTube URL above with the one you actually want to download. The program will then download and save the selected YouTube video as a MP3 file in your Downloads folder.

If you just want to download the video without converting it to MP3, you can use the following command to ignore the default configuration file.

youtube-dl --ignore-config

The file will be saved in your home folder as a MP4 file.