How to Embed the Audio Part of a YouTube Video on Your Website

You probably know that it is easy to embed Youtube videos on your website. Youtube provides an embed code for each and every one of its videos, and all you need to do is to copy/paste the code to your site. Now, what if you just want to embed only the audio part of the video? There’s actually a workaround that allows you to embed only the audio part of a YouTube video. Follow along to learn how.

1. Head over to YouTube and find the video (or audio) that you want to add to your website.

2. Once you are on the video page, note down the ID of the video you want to embed.

For example, if the video URL is, then the video ID is: Obx3e7MfEaI


3. In the following code, replace “VIDEO-ID” with the ID of the YouTube video that you noted down in the previous step.

While YouTube doesn't give you the embed code to embed the audio part of a video, you can make one yourself with the YouTube API using the above method.

// ]]>