ThumbGrab

YouTube Thumbnail URL from a Video ID

Every YouTube video has public preview images at predictable addresses. If you know the video ID, you can build the thumbnail URL yourself.

YouTube thumbnail URL pattern from a video ID

The URL pattern

YouTube serves thumbnails from its image servers at addresses of this shape:

https://i.ytimg.com/vi/VIDEO_ID/maxresdefault.jpg

Replace VIDEO_ID with the 11-character ID and the file name with the size you want:

File nameResolution
maxresdefault.jpg1280×720
sddefault.jpg640×480
hqdefault.jpg480×360
mqdefault.jpg320×180
default.jpg120×90

The file called 0.jpg is the same image as hqdefault, and 1.jpg to 3.jpg are small 120×90 frames.

When a URL returns an error

The small sizes exist for every video, but maxresdefault does not. If you open it and get a 404, that file was never generated for the video. That file is only generated for HD uploads, so older or standard-definition videos often lack it.

The shortcut

If you would rather not guess, paste the link into the tool on the page about how to get a YouTube thumbnail from a URL: it checks which files exist and shows each direct image URL ready to copy. If you do not have the ID yet, the next guide shows how to find a YouTube video ID.

Using the URL in a spreadsheet or a database

Because the address depends only on the video ID and the file name, you can build a whole column of thumbnail URLs from a column of IDs. A formula that joins the fixed start, the ID and the file name is enough. Remember to use a size that exists for every row, such as hqdefault.jpg, if some of your videos are old.

A worked example

Take the video ID dQw4w9WgXcQ. The 1280×720 file is at https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg, and the 480×360 file is at https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg. Only the file name changes between sizes, and the ID stays exactly as it is.

Two things to remember

Frequently asked questions

What is the URL of a YouTube thumbnail?

It follows the pattern https://i.ytimg.com/vi/VIDEO_ID/maxresdefault.jpg, where you swap in the video ID and, if needed, a different file name.

Which file name gives the largest thumbnail?

maxresdefault.jpg, at 1280×720, when the video has it.

Is there an official API for thumbnails?

YouTube's data API returns thumbnail URLs for a video, but for a single video the pattern above or a tool like ThumbGrab is quicker.

Does the URL work for Shorts?

Yes. A Short has a normal video ID, so the same pattern applies.

Why does the URL return an error for some videos?

Not every video has the larger files. The 480×360 hqdefault file exists for every video.

Keep reading

More free tools from the same family: LongTailLab, a free long-tail keyword research tool, TranscriptGrab, a free YouTube transcript extractor, and TubeGrabPro, a free YouTube video downloader.