Use JavaScript to unlock high-res YouTube videos

Above: You can see that especially on fast motion videos, the quality is noticeably better on the high-res video video (right) than the standard YouTube offering (left).
Faithful Macenstein reader brethil clued me into a cool YouTube trick that probably everyone besides me already knew about. Apparently if you open a YouTube url in your browser, then add “&fmt=18” (without the quotes) to the end, you will see a higher res version of whatever video you were watching.
Of course, with YouTube “high res” is a relative term, but the quality is noticeably better.
Try it yourself. Load this video:
and then load
You’ll notice the quality of the second clip is markedly less compressed looking, and you’ll also see a new link which says “Watch this video in lower quality for faster playback”, letting you know you indeed re watching the high-res version.
This tip is all well and good, but the boys over at macosxhints.com managed to come up with a couple easy ways to automate the process. First they created some AppleScripts to do the job, but then a reader came up with an even easier solution – just make a JavaScript bookmarklet!
To do this, just go into Safari (or Firefox) and make a blank bookmark, name it something like “High-Res” or something, and add the following to the “address” field:
javascript:window.location+=”&fmt=18″;
Now, all you have to do to watch a higher res version of any YouTube video is hit that button in your bookmarks bar. Sweet!







This is no longer needed. There is a checkbox in your YouTube account settings to always view higher res videos when they are available.
Um… yes, I suppose you could do that Alan…
… I guess….
seems like a lot of trouble though.
Don’t you think it’s much easier to write code and manual activate it each time you watch a video?
🙂
-The Doc
It certainly is the nerdier way, and I have total respect for that. 🙂
Still useful because I don’t always log in to YouTube to watch videos … though if you download the video, it’s in its “original” resolution.
umm… wouldn’t it be a javascript bookmark, not an AppleScript bookmark?
k.thx.bye.
What I want to know is if there is any way to access the h.264 version of clips from within the browser (or on the mac using some 3rd party software). I’m not sure where the iphone and apple tv get the content from.
Alan, there still seems to be an improvement in quality even when the pref is set in YouTube’s prefs.
-The Doc
setting the prefs in your youtube account to always view the high(er)-res version when available is the much easier way, i agree with alan. and when you download the .flv file, you get the high-res version you just viewed.
Why discriminate against Camino and Opera!?
I like this better because usually I watch the videos in low-res.
this : javascript:window.location+=â€&fmt=18″;
changes to:
javascript:window.location+=%E2%80%9D&fmt=18%E2%80%B3;
after I enter the javascript….
how do I fix?
hey guys, what are you changing in the account prefs to make quality better? when i change video playback quality under account to be hq, the quality does not seem to change at all and “Watch this video in lower quality for faster playback” does not appear either. Quality only changes when i add that javascript code.
YouTubeHD-Bookmarklet: http://youtubehd.ebiene.de
I’m also getting what john clark describes, the javascript gets warped. What’s wrong with me?
>>> AvatarAlan
Posted: Mar 29th, 2008 at 1:16 pm
1
This is no longer needed. There is a checkbox in your YouTube account settings to always view higher res videos when they are available.
This video quality checkbox doesent working :/
For those of you getting the:
javascript:window.location+=%E2%80%9D&fmt=18%E2%80%B3;
edit the bookmark, remove the %E2%80%9D and manually type the ” (double quote keystroke).
Note: you’ll have to do this twice (before and after the &fmt=18)
Thanks Z120U (Zisou?)!
That worked. Funny, those simple solutions, how hard they are to find..
It’s funny how a tiny URL tweak like adding &fmt=18 could make such a visible difference in video quality—I remember being blown away when I first tried it on a fast-motion clip. That kind of hidden gem is exactly why I love digging into community tips like this one. It also makes me think about how much we rely on tools that just work, without realizing there’s a better version hiding underneath. If you’re into creating your own video or music content, you might appreciate having a similar ‘upgrade’ for your audio. I’ve been experimenting with Free AI Music Generator lately, and it’s been a fun way to add custom soundtracks without any hassle. Definitely worth a look if you’re in a creative rut.
Wow, I had no idea you could unlock higher-res YouTube videos with a simple URL tweak like that! It’s amazing the little tricks people discover and share, and the side-by-side comparison in the post really shows the difference. I tried it on a few fast-moving clips and the improvement was obvious, especially on my big monitor. For anyone who likes to tinker with media, this is a fun one to test out. And if you’re into tweaking visuals, you might also enjoy Phototext for editing text in screenshots or images.
While it’s evident that adding ‘&fmt=18’ to a YouTube URL significantly improves video quality, especially for fast motion clips, I found it intriguing how the technique leans on JavaScript to achieve this. It’s fascinating how something as simple as a URL tweak can unveil hidden layers of content, a detail that might not be obvious to everyone. This insight into YouTube’s hidden features is something I’ve not encountered before, though it does remind me of Protected Notepad‘s functionality of discreetly sharing and destroying notes online.
AppleScript automation has always been a game-changer for streamlining media workflows and video extraction. Today, visual media creation is even more accessible through AI-driven tools that let you Turn Photo into Video in just a few clicks, making high-quality video generation effortless for creators. Great nostalgic tech tutorial!
Nice tip! What’s interesting is that the &fmt=18 trick seems to improve quality even for people who’ve already set the higher-res preference in their YouTube account settings, so the bookmarklet is still handy for when you’re not logged in.
I recently came across an intriguing tip about how to view high-res YouTube videos. Specifically, Dr. Macenstein’s post about unlocking higher resolution videos piqued my interest. I noticed that especially on fast motion clips, the quality leaps compared to standard YouTube. This got me thinking: could similar tricks apply to create high-quality content? For example, something like the Ozil goal ai video could benefit from such methods.