Youtube HD mp4 download

*** This post was updated with new JavaScript code on 27-oct-2009 ***

Sure, you can install Video Downloadhelper for Firefox if you want an easy way to download your favourite YouTube videos.

However, these will be downloaded in “FLV” format (Flash video). Nowadays, many videos on YouTube are available in High-Definition (HD) format and you may want to retrieve the higher quality (MP4) movies instead.

Here is a bit of JavaScript which checks if the movie you selected is available as HD 720p. If a HD format is available it will be the preferred download type (fmt24) instead of the usual “high” (fmt18) or

I got the javascript code from this page, which I found after my original javascript code stopped working (I guess Google removed the javascript functions to block folks like us): . The new code is a lot uglier than the initial javascript, but it works. That page also has the same code available, nicely reformatted, as a GreaseMonkey script if you have that firefox extension already installed.

Define the following text as a bookmark and you are only a click away from downloading HD YouTube videos (in Firefox, right-click the link below and select “bookmark this link“):


Note: this was the old code which now will no longer work:


The proof of the pudding is in the eating. Select a YouTube video, click on “pause” if you do not want to play it in the embedded video frame. Then, click on the bookmark you created and the video will start downloading. It will (always) be saved with the name “video.mp4” so you will have to rename it after the download finishes.

Have fun! Eric

9 thoughts on “Youtube HD mp4 download

    1. Hm indeed, Google is blocking the javascript that used to work. It needs a lot more fiddling now, but luckily someone figured it out. I’ll update the main post with the new code.


  1. nice tool.
    but i am using Brorsoft YouTube Converter which can help me to free download youtube videos and also help me to convert youtube videos to other formats i need,eg convert to mp4 to put on my iphone.

Leave a Reply to Larr Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.