Learn how to obtain the thumbnails of any YouTube video online.

How to obtain the thumbnails of any YouTube video

The thumbnails of a YouTube video allow users to quickly understand the thematic of the video they're browsing on YouTube. They are generated automatically after uploading a video to the platform. The images are pretty lightweight, so as a developer, you may use them to show a preview of a video, instead of embedding the whole iframe that will increase considerably the size of your web page.

In this article, I will explain to you how to easily obtain the thumbnails of any YouTube video either with an online tool or by building the URL of the thumbnail by yourself.

A. Using an online tool automatically

If you are looking to obtain the thumbnail of any video quickly, you can rely on this online tool that extracts the 4 available thumbnails of the YouTube video:

youtubethumbnail.download is a free online tool to download the thumbnails of any YouTube video

You can use the youtubethumbnail.download tool to download the thumbnail of any YouTube video here. The tool is really simple and allows you to see online the 4 thumbnails in the 4 different qualities, you can copy the link of the image to the clipboard or you can directly download the image.

B. Building the link by yourself

The thumbnails of any video on YouTube are hosted in a static URL that can be easily modified, just replace <YOUTUBE-VIDEO-ID> with the id of the YouTube video that you want:

https://img.youtube.com/vi/<YOUTUBE-VIDEO-ID>/hqdefault.jpg

You can extract the ID of any youtube video from its URL, as its specified as the value of the get parameter v, for example, the following URL:

https://www.youtube.com/watch?v=9CAz_vvsK9M

Would have the following ID: 9CAz_vvsK9M. So the link to see the thumbnail from the previous video would be:

https://img.youtube.com/vi/9CAz_vvsK9M/hqdefault.jpg

The hqdefault.jpg image contains the default high-quality thumbnail of the video, however, there are 4 different qualities that you can access. We will list them here from lower to higher quality.

mqdefault.jpg (Medium Quality)

The URL to obtain the thumbnail of Medium Quality is the following one:

https://img.youtube.com/vi/<YOUTUBE-VIDEO-ID>/mqdefault.jpg

The medium quality thumbnail has the worst quality of all the thumbnails with a size of 320 pixels by 180 (320x180).

hqdefault.jpg (High Quality)

The URL to obtain the thumbnail of High Quality is the following one:

https://img.youtube.com/vi/<YOUTUBE-VIDEO-ID>/hqdefault.jpg

The medium quality thumbnail has a regular quality of all the thumbnails with a size of 480 pixels by 360 (480x360).

sddefault.jpg (Standard Quality)

The URL to obtain the thumbnail of Standard Quality is the following one:

https://img.youtube.com/vi/<YOUTUBE-VIDEO-ID>/sddefault.jpg

The standard quality thumbnail has better quality and is the one you see on the index page of YouTube, this one has a size of 640 pixels by 480 (480x360).

maxresdefault.jpg (Max Quality)

The URL to obtain the thumbnail of Max Quality is the following one:

https://img.youtube.com/vi/<YOUTUBE-VIDEO-ID>/maxresdefault.jpg

The standard quality thumbnail has the best quality available from the thumbnail, this one has a size of 1280 pixels by 720 (1280x720).

Happy coding ❤️!


Senior Software Engineer at Software Medico. Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Sponsors