How to Embed High Quality & Higher Resolution YouTube Videos on Blog or Website

»»»How to Embed High Quality & Higher Resolution YouTube Videos on Blog or Website

Viewers can now opt to view YouTube video clips in higher quality, or even set YouTube to playback the video in high resolution HD quality automatically by default whenever the video is watched on YouTube website. However, for YouTube video clip which embedded on blog or web page, viewers won’t have such flexibility to switch or upgrade the video playback to higher quality streaming, unless webmaster or blogger specifically embed a high quality and high resolution YouTube embed code on the website.

To allow visitors to web pages embedded with YouTube video clip to view and watch the video in high quality mode, webmaster has to use the hack below to embed the code that will stream from high quality video source, which stream as a MP4 (H264 with AAC audio) and encoded at 480×360. Similar to the hack to watch high quality video on YouTube with &fmt=18 or &fmt=6 switch, publisher needs to append a switch to the YouTube embed code so that the Flash Player knows that it should play the video with high quality video streaming.

What’s the different between normal quality and high quality YouTube videos? Take a look at the 2 embedded YouTube video clips below, featuring sexy Mariah Carey singing Touch My Body, and you would amazed.

Video no longer available
Normal quality version of YouTube video

Video no longer available
High quality version of YouTube video

However, the default “&fmt=18” flag for URL address bar will not work on embed code. In YouTube embed code, add and append &ap=%2526fmt%3D18 to the end of video clip’s URL specified in “param value” and “embed src”. For example, for video above, the embed code will be as below:

<object width=”425″ height=”344″><param name=”movie” value=”″></param><embed src=”″ type=”application/x-shockwave-flash” width=”425″ height=”344″></embed></object>

Apend the &ap=%2526fmt%3D18 to the end of two instances of within the original quotation mark, where xxxxxxxxxxx represents the unique video ID. The high quality YouTube embed looks like below:

<object width=”425″ height=”344″><param name=”movie” value=”″></param><embed src=”″ type=”application/x-shockwave-flash” width=”425″ height=”344″></embed></object>

The best part of high quality video can be enlarged to the width of 480 with affecting the viewing quality as the streaming video is encoded in 480×360 resolution.

Video no longer available

With HD era arriving, YouTube now supports playback of YouTube hosted video in 720p HD (High Definition) picture quality resolution in near CD audio quality. Here’s how to embed video on external third party websites or blogs to play YouTube in 720p resolution or embed video to play in HD by default.

Update: The parameters in URL is no longer necessary as YouTube now adjust the resolution based on video size and Internet bandwidth available.

By | 2017-11-21T15:48:07+00:00 November 21st, 2017|Categories: Media Streaming|Tags: , |54 Comments

About the Author:

LK is a technology writer for Tech Journey with background of system and network administrator. He has be documenting his experiences in digital and technology world for over 15 years.Connect with LK through Tech Journey on Facebook, Twitter or Google+.
  • Excellent Post my friend!! It was so easy!

  • That was EXACTLY what I was looking for!!!! Now to figure out where the FULL SCREEN option has gone when I embed!!

  • hi,
    i try the "&ap=%2526fmt%3D18" code and it doesn't work,
    my video is a avi type,
    there is a different code for avi???
    thanks in advance.

  • Bart

    You're da man! 🙂 Thanks!

  • Bart

    Yoram, you're the first guy that managed to get an AVI from Youtube. This is about embedding YouTube Flash-video. Not AVI's.

  • This is great u was wondering how to embed with the high definition

  • Sim

    Thanks for the code. Worked like a charm!!

  • What a great post. Thanks!

  • Okay, have used this a lot now… but is there a way to force High Quality on embedded LATEST VIDEO players like this one:

    I also tried the FULL SCREEN code but it too doesn't work on these bespoke players. Any advice?

  • pspargur

    this is amazingly helpful and simple. thanks!

    your mariah video is dead, you can use our hula video in its place if you like!

  • "&ap=%2526fmt%3D18" is very helpfull. Thanx for that!

    but i have the same question like JumpOff:

    How can i embed high quality and higher resolution youtube videos as a PLAYLIST ?

    I tried "&ap=%2526fmt%3D18" with a playlist like ?
    but it doesn´t work.

  • JS

    I think Google fixed all of this…. I think.
    The new blogger just got a much needed update/upgrade(?) and now when you build and edit a new blog you will find a ton of built in "widgets" or "gadgets" or whatever you like to call them.
    One of which is a YouTube player. This player works on every system I testing it on.. iPhone, Firefox (mac & PC), Chrome, and IE.

    The only thing is.. I'm not sure if it's that high quality player or just the same loFi stream from before.

    Point being.. Google owns/is YouTube so I imagine this might be the place for the answer. Let me repeat.. these were the only YouTube player codes that I could see on every browser and on my iPhone.*

    *And the best part is.. when you press play on the video box from one of these Google charged players it opens the thing in the phones native YouTube player. Then it can be bookmarked, added to the home screen, or sent to a "friend".
    Pretty damn clever!

    Now what about that HQ embed issue. Go experiment with it and report your results. The future of respectable quality video depends on nerds like us.

  • Ted

    This high quality script works fine in IE but fails to load the video using Firefox.

    I use a combination of high quality and autoplay in both script locations as follows:


    Here is the Firefox issue:

    Using autoplay=1 in both locations along with the high quality script included in the first instance only and omitted from the second instance, the low quality video plays fine. However if I add the high quality script to the second instance, Firefox stalls, It appears to be continuously downloading with the following comment in the status bar:

    Transferring data from… (example, IP address varies)

    Note, the low quality version downloads from:… so it appears the redirect to the HQ version is functioning OK.

    I cleared the browser cache after each test to make sure Firefox wasn’t loading the web page from cache.

    As per previous comment, this seems to be a Firefox issue as high quality functions great using IE6.

    Has anybody else experienced this when using Firefox and if so, is there a known workaround????


  • I am not trying to plug here but I was having trouble working out how to watch, create and embed high quality video in Youtube. I found out the easist ways and have recently put up a website that explains it all.

    The site is totally free. I have even included a script that generates the high quality embed code for you with different options. So it's even easier.

    You can take a look at:

    It's free and I'm trying to help the guys that don't know or make it easier for the guys that do. Thanks, Mark
    <a href="” target=”_blank”>

  • Bruno

    Thank you very very much for that.

  • Pingback: DonsTag » Coloured Canyon (Sinai)()

  • Awesome tip; it really makes a difference on embedded vids. Thanks!

  • Thanks so much for the youtube tweak. It was just the the thing that was needed.

  • Thanks for the 'thank you's' guys 🙂

    Have you tried the video encoder yet? It's totally free and will encode to H.264 (X264) format for you, easily. I've put up some videos about it.


  • ian

    Nice! Works PERFECTLY. Thanks….

  • darcloud

    simply amazing, thank you.

  • This is a great hack!!!!

    I am wondering, though, how to do this for the customized youTube video players.

    YouTube allows users to create ccustom players, but how do you get the high quality video in here?

    example :

    ideas? hacks?

  • jan

    Thanks a lot man! I've been frustrated for a long time about always having to put crappy videos on my websites. This is just awesome!

  • Dean

    Here's a link to a video that can be viewed in high and low quality.

    Makes a big difference

  • Do anyone knows the way to embed you tube video to powerpoint presentation?

  • Do anyone knows how to embed you tube video to ppt…?

  • Pingback: Added some howto videos « status blog()

  • Julian

    thank you!

  • epic fail videos don't play

  • Roy

    Great but how do you embed high quality with youtube's custom video player?

  • Thank you for this priceless information.

    Cheers. 🙂

  • bob

    Brilliant! Works like a treat! Well done and many thanks!!!

  • mrdougan

    Thanks a million this has been a life saver for me

  • Thanks for the help bro, much appreciated!

  • Pingback: Σε widescreen και καλύτερη ποιότητα τα embed video στο wiggler at Wiggler()

  • Pingback: NosillaCast @

  • Do you know how to hack VIMEO for HD embedding.

    Thank you for the YouTube hack i'm already using it.


  • Pingback: From YouTube HQ: HQ Video Embeds « NewTeeVee()

  • Pingback: How to Integrate Social Media into Product Marketing « I’m Not Actually a Geek()

  • Thanks for providing this tip. Works great!

  • Hey, thanks for the code. I couldn’t figure it out on the embed code, until I used the &ap=%2526fmt%3D18 . That helped me out, and I couldn’t find it anywhere else. Have a great day.

  • Great ! I will add this to my bookmarks. TY

  • Bonus Bill

    This is really useful, thanks a lot for the tip – the videos in low quality just look so bad, but this makes all the difference

  • Thanks for this post, it helped me embed high quality videos from youtube on my blogs.

  • Dessa

    Thanks! This worked! 😀

  • lilian

    Is it possible to embed high quality video with YouTube Custom Player, especially that layout with many small screens display on the side? Its video ID# goes like this: ="; I tried to append &ap=%2526fmt%3D18 to the end of the video ID# within the original quotation mark (as you have suggested above)but it doesn't work. Please HELP! Thank you in advance.

  • hey, a couple of things:

    1) The only problem I have with HQ embedding is that the little icon in the video doesn't actually show that it is HQ or HD, which i just annoying, because visitors will always hit the button for better quality, not realizing that it doesn't do anything. Does anyone know if there is a way to get around this???

    2) the videos in this post are dead.

    Thanks guys!

  • I'd been searching all over for this, no one could tell me. I just added this to my videos and it worked.

    I was using vimeo for a long time because of this, still uploading to youtube, now I can use youtube videos on my site and not sacrifice the quality.

    Thanks a bunch!

  • Cool..The embedded code works for my website and some friends told me that I have a different quality videos (means good quality, off course..)


  • chet

    Since a few days the hack doesn't work anymore
    This is the answer from youtube

    YouTube has recently been upgrading. Here's a statement in the uploads section of their "known Issues" website.

    "HQ disappearing / not available for videos that meet HQ standards

    We made improvements to standard quality for video uploads! Unless there is a large difference between standard quality and HQ , the upload will produce standard quality by default (and not HQ as before)."

    Anyone knows an updated hack ??

  • Really good tip, I use this often even on regular quality video's as it makes them a little clearer

  • SumJuam

    Sorry, but as of today (3/14/10) this tip does not work on my embedded Youtube HQ videos.

  • omar updates

    i have to try it. can't see the vids as they are no longer available now..

  • Fart McNugget

    you have to make sure the iframe is bigger or equal to the desired HD resolution or it won’t default to HD. If your iframe is smaller but you still want it in HD, you can scale/zoom the iframe. This is a little tricky for each browser, but it does work nicely. You’d think if you played 480p in a 480p sized windows that it would look the same as a scaled 720p HD video playing in a 480p windows but it doesn’t, it looks better, must be super sampling at work.