How to Find a YouTube Video ID from Any URL (Complete 2026 Guide)

Learn how to find the YouTube video ID hidden in any link — watch URLs, Shorts, youtu.be, embeds, and more. 7 methods, plus a free extractor tool.
Laptop showing a YouTube URL with a magnifying glass, representing how to find a YouTube video ID

Every YouTube video, Short, and livestream has one thing in common: a hidden, unchanging 11-character code called the Video ID. It's the single piece of information behind embeds, API calls, custom thumbnail URLs, deep-linked timestamps, and dozens of third-party tools. Yet most guides only show you how to spot it in a standard watch?v= link and stop there — leaving Shorts, embeds, mobile share links, and playlist URLs completely unexplained.

This guide covers all seven YouTube URL formats where the video ID hides, three different extraction methods (manual, browser-based, and code-based), the mistakes that trip people up most often, and what you can actually do with a video ID once you have it — including generating direct thumbnail image links in seconds.

Quick Answer

The YouTube video ID is the 11-character code in any video's URL. In a standard link like youtube.com/watch?v=dQw4w9WgXcQ, it's everything after v= — in this case, dQw4w9WgXcQ. The same 11-character format applies whether the link is a youtu.be short link, a Shorts URL, or an embed code; only its position in the URL changes.

What Is a YouTube Video ID?

A YouTube Video ID is an 11-character string made up of uppercase letters, lowercase letters, numbers, underscores (_), and hyphens (-) — for example, dQw4w9WgXcQ. YouTube assigns one permanently to every video and Short the moment it's uploaded, and it never changes, even if the creator edits the title, thumbnail, or privacy setting later.

This ID is what YouTube's systems actually use behind the scenes to identify a video — the rest of the URL (domain, query parameters, playlist references) is just routing information for your browser. That's why so many tools, from embed generators to the YouTube Data API to thumbnail downloaders, ask for the video ID specifically rather than the full link.

The character set used is 64 possible values per position (26 lowercase letters, 26 uppercase letters, 10 digits, plus - and _), across 11 positions. That works out to roughly 73 quintillion possible combinations (6411) — far more than YouTube will ever need, which is why IDs are assigned essentially at random rather than sequentially. This is also why you can't guess or "walk" your way through video IDs to discover unlisted or private content; there's no predictable pattern to exploit.

Video ID vs. Channel ID vs. Playlist ID — Don't Confuse These

One of the most common points of confusion, especially for people new to working with YouTube links or the Data API, is mixing up video IDs with the other identifier types YouTube uses. They look similar at a glance but serve completely different purposes:

IdentifierLength / FormatFound InUsed For
Video ID11 characterswatch?v=, /shorts/, youtu.be/Identifying a single video or Short — thumbnails, embeds, timestamps
Channel ID24 characters, starts with UCyoutube.com/channel/UC...Identifying a creator's channel — subscriber feeds, channel-level API calls
Playlist IDVariable length, often starts with PL, UU, or LL&list= parameterIdentifying an ordered collection of videos, not any single video
Custom HandleStarts with @youtube.com/@channelnameHuman-readable channel URL — not a stable ID, can be changed by the creator

If a tool or API call is rejecting your input with an "invalid video ID" error, the most common cause is accidentally pasting a channel ID or playlist ID instead — they're all 11+ character strings that can look superficially similar if you're not paying close attention to the surrounding URL structure.

7 YouTube URL Formats — Where the ID Hides in Each

YouTube links look different depending on where they were copied from — the address bar, the mobile app's share sheet, an embed code, or a Shorts feed. Here's exactly where the 11-character ID sits in each one:

URL TypeExampleWhere the ID Is
Standard watch URLyoutube.com/watch?v=dQw4w9WgXcQAfter v=, before the next &
Short linkyoutu.be/dQw4w9WgXcQImmediately after the final /
YouTube Shortsyoutube.com/shorts/dQw4w9WgXcQAfter /shorts/
Embed / iframe srcyoutube.com/embed/dQw4w9WgXcQAfter /embed/
Legacy old-style embedyoutube.com/v/dQw4w9WgXcQAfter /v/
Live stream URLyoutube.com/live/dQw4w9WgXcQAfter /live/
Playlist-attached URLyoutube.com/watch?v=dQw4w9WgXcQ&list=PL...&index=3Same as standard — after v=, everything from &list= onward is a separate parameter, not part of the ID

Notice the pattern: no matter which format you're looking at, the value you want is always exactly 11 characters. If what follows v=, the last slash, or /shorts/ is longer or shorter than 11 characters, you've likely also captured part of a tracking parameter or playlist reference — more on that in the mistakes section below.

Method 1: Finding the ID Manually (Desktop & Mobile)

On Desktop

  1. Open the video in your browser.
  2. Look at the address bar — the full URL is visible there.
  3. Find the text after v= (or after the last / for youtu.be links) and copy exactly 11 characters, stopping at the first & if one appears.

On the YouTube Mobile App

  1. Open the video you want.
  2. Tap the Share icon below the player.
  3. Tap Copy Link — this places a youtu.be-style short link on your clipboard.
  4. Paste it into Notes, a browser bar, or directly into a tool like our YouTube Thumbnail Downloader — most tools accept the full pasted link and extract the ID automatically, so you rarely need to trim it by hand.

This manual approach is fine for a one-off lookup, but it gets tedious fast if you're processing more than a handful of links — that's where the next two methods come in.

Method 2: The "Stats for Nerds" Trick

This method is the most reliable one when a URL has been mangled by a link shortener, a tracking wrapper, or a social media platform that strips query parameters — situations where the visible URL genuinely doesn't contain a usable ID.

  1. Start playing the video.
  2. Right-click anywhere on the video player (desktop only).
  3. Select Stats for Nerds from the context menu.
  4. A small overlay appears in the top-left corner of the player. Look for the line labeled Video ID — that's your 11-character value, pulled directly from YouTube's own player data rather than the URL.

Because this reads the ID straight from the video player itself, it works even on embedded players on third-party websites, and it's immune to whatever URL shortener or UTM tracking parameters got tacked onto the link along the way.

Method 3: Extracting a Video ID with Code (Regex)

If you're building a tool, processing a spreadsheet of hundreds of links, or automating a workflow, a single regular expression can pull the ID out of any of the seven formats above in one pass. Here's a JavaScript pattern that covers watch URLs, youtu.be links, Shorts, and embeds:

function extractVideoId(url) { const pattern = /(?:v=|\/v\/|\/embed\/|\/live\/|youtu\.be\/|\/shorts\/)([a-zA-Z0-9_-]{11})/; const match = url.match(pattern); return match ? match[1] : null; } // Examples extractVideoId("https://youtube.com/watch?v=dQw4w9WgXcQ&list=PL123"); // "dQw4w9WgXcQ" extractVideoId("https://youtu.be/dQw4w9WgXcQ"); // "dQw4w9WgXcQ" extractVideoId("https://youtube.com/shorts/dQw4w9WgXcQ"); // "dQw4w9WgXcQ"

A couple of implementation notes worth knowing before you drop this into production code:

  • The capturing group ([a-zA-Z0-9_-]{11}) enforces the exact 11-character length, which filters out most false positives from surrounding text or extra path segments.
  • This pattern won't expand shortened links from generic services like bit.ly or TinyURL — those need to be resolved to their final YouTube URL first (a simple HTTP redirect follow) before the regex can find the ID.
  • If you're working in Python instead, the same logic translates directly:
import re def extract_video_id(url): pattern = r'(?:v=|/v/|/embed/|/live/|youtu\.be/|/shorts/)([a-zA-Z0-9_-]{11})' match = re.search(pattern, url) return match.group(1) if match else None # extract_video_id("https://youtu.be/dQw4w9WgXcQ") -> "dQw4w9WgXcQ"

Bulk Extraction Without Code (Google Sheets)

If you have a spreadsheet full of YouTube links — say, a content calendar or a list of competitor videos — and no interest in writing code, Google Sheets' built-in REGEXEXTRACT function does the same job as the regex above with a single formula. Assuming your URLs are in column A starting at row 2:

=REGEXEXTRACT(A2, "(?:v=|\/v\/|\/embed\/|\/live\/|youtu\.be\/|\/shorts\/)([a-zA-Z0-9_-]{11})")

Drag this formula down the column and every video ID populates automatically, regardless of whether the source URL was a standard watch link, a youtu.be short link, or a Shorts link. This is the fastest way to prep a batch of URLs for a bulk thumbnail download or to build a reference list for a content audit, without touching a single line of code.

One caveat: Google Sheets' REGEXEXTRACT returns only the first capturing group by default, which is exactly what we want here — but if your formula returns an error instead of an ID, double-check that the cell actually contains a full URL and not just a bare video ID or a shortened link that Sheets can't parse.

Common Mistakes When Extracting a Video ID

  • Including the playlist parameter. A URL like watch?v=dQw4w9WgXcQ&list=PLxyz only has dQw4w9WgXcQ as the video ID — everything from &list= onward belongs to the playlist, not the video.
  • Including a timestamp. Links with &t=45s at the end are still just the base video ID plus a start-time parameter; don't copy the t=45s part as though it were part of the ID.
  • Copying a shortened link as-is. Generic URL shorteners (not youtu.be, which is YouTube's own) hide the real YouTube URL entirely — you have to open the link first, then copy the resulting address bar URL.
  • Miscounting characters. Video IDs are always exactly 11 characters. If your extracted string is 10, 12, or more, you've likely grabbed a truncated or extended value by mistake.
  • Assuming Shorts and regular videos use different ID formats. They don't — a Short's ID is structurally identical to a regular video's ID; only the URL path (/shorts/ vs /watch?v=) differs.
  • Confusing a video ID with a channel ID. As covered above, channel IDs are 24 characters and start with UC — feeding one into a tool expecting a video ID will simply fail or return "video not found."
  • Pasting a YouTube Music link. URLs from music.youtube.com use the same 11-character ID format and the same ?v= parameter, but the surrounding domain and extra parameters (like &feature=share) sometimes trip up simpler regex patterns that only check for youtube.com or youtu.be exactly.
Skip the manual work

Once you have a video ID (or even just the full URL — no extraction needed), you can pull every available thumbnail resolution for that video instantly, including the max 1280×720 version, with our free tool.

📷 Try the YouTube Thumbnail Downloader →

What You Can Do With a Video ID

Once you have a clean 11-character video ID, it unlocks several practical use cases:

Build a Direct Thumbnail URL

YouTube hosts thumbnails at predictable URLs built from the video ID, e.g. https://i.ytimg.com/vi/VIDEO_ID/maxresdefault.jpg. Our YouTube Thumbnail Downloader builds all five available resolutions for you automatically — paste a link, get every size in one screen, no manual URL editing required.

Embed the Video on a Website

The standard embed format is https://www.youtube.com/embed/VIDEO_ID, dropped into an <iframe> tag. This is the same ID from any of the seven URL formats above — they're all interchangeable once extracted.

Create a Deep Link to a Specific Timestamp

Appending ?t=90s (or &t=90s if other parameters are already present) to a URL built from the video ID jumps the viewer straight to the 90-second mark — useful for citing a specific moment in a long video.

Query the YouTube Data API

Developers working with the official YouTube Data API pass the video ID directly as a parameter to retrieve metadata, statistics, and caption tracks for a specific video.

Fetch Title and Channel Info via oEmbed

YouTube's public oEmbed endpoint (youtube.com/oembed?url=...&format=json) accepts a full video URL and returns the video's title and channel name without requiring an API key — handy for lightweight integrations that just need display metadata.

Batch-Check Whether Videos Are Still Available

If you maintain a list of video IDs — say, from an old content archive or a competitor tracking sheet — you can quickly check which ones are still live by requesting each one's thumbnail. Since YouTube removes a video's hosted thumbnail images the moment the video is deleted or made private, a failed thumbnail request (a 404 on i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg) is a reliable signal that the video is no longer publicly accessible. This is a lightweight alternative to making a full API call just to check video status, and it's exactly the check our thumbnail tool runs internally before showing you results.

Frequently Asked Questions

  • Yes. Every standard YouTube video and Short uses an 11-character ID made of letters, numbers, underscores, and hyphens. This has been consistent across YouTube's entire video library for years.

  • No. Video IDs are unique identifiers assigned permanently at upload time. Once a video is deleted, its ID is retired and not reassigned to a different video.

  • No. Editing a video's title, description, custom thumbnail, or visibility setting has no effect on its ID. The only thing that removes an ID from use is deleting the video entirely.

  • Look immediately after /shorts/ in the URL — the next 11 characters are the ID, using the exact same format as a regular video. No conversion is needed between Shorts and standard video IDs.

  • Not manually — tools like our YouTube Thumbnail Downloader extract the ID automatically from any pasted link, including Shorts and youtu.be links, so you never have to isolate it by hand.

  • This usually happens when a playlist parameter (&list=) or timestamp (&t=) is copied along with the ID. Trim your extraction to exactly 11 characters starting right after v=, the last /, or /shorts/.

Sources & Further Reading

Final Thoughts

Once you know where to look, spotting a YouTube video ID takes about two seconds — but as this guide shows, "where to look" changes depending on whether you're holding a standard link, a Shorts URL, an embed code, or a link that's already passed through a shortener. Bookmark the format table near the top of this guide next time you're not sure which pattern you're dealing with, and reach for the regex or Google Sheets formula the moment you're processing more than a couple of links at once.

And if the reason you needed the ID in the first place was simply to grab a thumbnail image, you can skip the extraction step entirely — paste the full YouTube URL into our free YouTube Thumbnail Downloader and every available resolution, from 120×90 up to the full 1280×720 max-resolution version, is ready to download in seconds.

youtube video id find youtube video id youtube video id from url extract youtube video id youtube video id finder youtube shorts video id youtube embed video id youtube video id regex

Post a Comment