How to Find a YouTube Video ID from Any URL

How to Find a YouTube Video ID from Any URL

Find the 11-character YouTube video ID in watch, youtu.be, Shorts, Live and embed URLs, with desktop/mobile steps, regex and Google Sheets examples.
YouTube URL on a laptop screen highlighting the 11-character video ID

If you need a YouTube video ID for an embed, API request, thumbnail URL, spreadsheet, or another tool, you usually do not need to search very far. For a normal YouTube link, the video ID is the 11-character value that identifies the video. In a URL such as https://www.youtube.com/watch?v=dQw4w9WgXcQ, the ID is dQw4w9WgXcQ.

The part that causes confusion is that YouTube does not use one URL format everywhere. A copied link may come from a standard watch page, the mobile Share button, Shorts, a live stream, an embed, YouTube Music, or a playlist. This guide shows where to find the YouTube video ID in the most common formats, then covers a reliable manual method, YouTube's Stats for Nerds panel, a practical regex for developers, and a Google Sheets formula for bulk lists.

Quick answer

For a standard YouTube URL, copy the 11 characters after v=. For youtu.be links, copy the first 11-character path after the domain. For Shorts, copy the 11 characters after /shorts/.

Example: youtube.com/watch?v=dQw4w9WgXcQ → Video ID: dQw4w9WgXcQ

What Is a YouTube Video ID?

A YouTube video ID is the identifier YouTube uses to refer to a particular video. YouTube's IFrame Player API treats an ID that is not 11 characters long as invalid, which makes the 11-character length a useful check when you are copying or extracting an ID from a URL.

A video ID is different from the video's title, channel handle, playlist ID, or the extra tracking parameters that may appear in a shared link. The title and thumbnail can change while the same video URL continues to point to the same video ID.

Video IDdQw4w9WgXcQ
Identifies one YouTube video or Short.
Not part of the ID&list=..., &t=..., ?si=...
These are separate URL parameters.

Where Is the YouTube Video ID in Different URL Formats?

These are the formats most people run into. They are not the only YouTube URLs that exist, but they cover the common watch, share, Shorts, live, embed, playlist, and Music cases.

URL typeExampleVideo ID location
Standard watch URLyoutube.com/watch?v=dQw4w9WgXcQAfter v=
Shared short linkyoutu.be/dQw4w9WgXcQ?si=abc123After youtu.be/, before ?
YouTube Shortsyoutube.com/shorts/dQw4w9WgXcQAfter /shorts/
Live URLyoutube.com/live/dQw4w9WgXcQAfter /live/
Embed URLyoutube.com/embed/dQw4w9WgXcQAfter /embed/
Watch URL with playlistyoutube.com/watch?v=dQw4w9WgXcQ&list=PL...The value after v=; the playlist value is separate
YouTube Musicmusic.youtube.com/watch?v=dQw4w9WgXcQAfter v=

Shared-link tip: YouTube's Share button may add parameters such as ?si=.... Those parameters are not part of the video ID. The ID is still the same 11-character value.

How to Find a YouTube Video ID Manually

On a desktop browser

  1. Open the YouTube video.
  2. Click the browser address bar.
  3. For a normal watch URL, find v=.
  4. Copy the next 11 characters. Stop before an & or other parameter.

For example:

https://www.youtube.com/watch?v=dQw4w9WgXcQ&list=PL123 └── video ID ──┘

On iPhone or Android

  1. Open the video in the YouTube app.
  2. Tap Share.
  3. Tap Copy link.
  4. Paste the link into Notes, a browser, or any text field where you can inspect it.
  5. If it is a youtu.be link, the first 11-character path after the domain is the video ID.

If your only goal is to download the video's thumbnail, you do not have to extract the ID manually. Our Bulk YouTube Thumbnail Downloader accepts the full YouTube URL and extracts the ID for you.

For a YouTube Short

In a Shorts URL, look immediately after /shorts/:

https://www.youtube.com/shorts/dQw4w9WgXcQ └── video ID ──┘

For a live stream or embed

The same idea applies to live and embedded URLs. The video ID follows /live/ or /embed/. YouTube also uses video IDs in its official embed and player APIs, so the identifier is the same whether you are watching the video on YouTube or loading it in an embedded player.

How to Find the Video ID with “Stats for Nerds”

YouTube's Stats for Nerds panel is useful when the URL you were given is messy, redirected, or embedded on another page. On desktop, YouTube's own help documentation says you can open a watch page, right-click the player, and choose Stats for nerds.

  1. Open and play the video.
  2. Right-click inside the YouTube player.
  3. Select Stats for nerds.
  4. Look for the Video ID / sCPN entry. The first value is the video ID.

This is also a useful cross-check if you are unsure whether you copied a playlist ID or another parameter by mistake.

How to Extract a YouTube Video ID from a URL with Regex

If you are processing URLs in code, a regex can handle the most common YouTube URL patterns. The following JavaScript example supports standard watch links, youtu.be, Shorts, live URLs, embeds, and the older /v/ format:

function extractYouTubeVideoId(input) { const match = input.match( /(?:v=|youtu\.be\/|\/shorts\/|\/embed\/|\/live\/|\/v\/)([A-Za-z0-9_-]{11})/ ); return match ? match[1] : null; } // Example extractYouTubeVideoId( "https://www.youtube.com/watch?v=dQw4w9WgXcQ&list=PL123" ); // "dQw4w9WgXcQ"

The 11-character capture group helps prevent playlist parameters and timestamps from being included in the result.

Developer note: A regex extracts a matching pattern; it does not prove that the input came from a genuine YouTube domain or that the video exists. If the URL comes from users or another untrusted source, validate the hostname separately and use the YouTube API or player response when you need existence/availability checks.

Python version

import re def extract_youtube_video_id(text): pattern = r'(?:v=|youtu\.be/|/shorts/|/embed/|/live/|/v/)([A-Za-z0-9_-]{11})' match = re.search(pattern, text) return match.group(1) if match else None

How to Extract YouTube Video IDs in Google Sheets

For a content calendar, research sheet, or list of YouTube URLs, Google Sheets can extract the video ID without a script. Google Sheets supports regular expressions through REGEXEXTRACT.

If the YouTube URL is in cell A2, use:

=IFERROR(REGEXEXTRACT(A2,"(?:v=|youtu\.be/|/shorts/|/embed/|/live/|/v/)([A-Za-z0-9_-]{11})"),"")

Then fill the formula down the column. It will return the first matching 11-character video ID and leave the cell blank when no supported pattern is found.

This is especially handy when you want to prepare a list for a bulk YouTube thumbnail download: keep the original URLs in one column and the extracted IDs in another for reference.

YouTube Video ID vs Channel ID vs Playlist ID

These identifiers appear in similar-looking URLs, but they are not interchangeable.

IdentifierExample locationWhat it identifies
Video IDwatch?v=..., /shorts/..., youtu.be/...One video or Short
Channel IDyoutube.com/channel/...A YouTube channel
Playlist IDlist=...A playlist or collection of videos
Channel handleyoutube.com/@nameA human-readable channel handle

If an embed, API request, or thumbnail tool says “invalid video ID,” check that you have not pasted a channel handle, channel ID, or playlist value instead.

What Can You Do with a YouTube Video ID?

1. Get a YouTube thumbnail

YouTube exposes thumbnail information for videos, and the YouTube Data API documents several thumbnail sizes, including a maxres image of 1280×720 when that size is available. If you do not want to build thumbnail URLs manually, the Bulk YouTube Thumbnail Downloader checks available sizes and can also process multiple video links.

Need the thumbnail, not the ID?

Paste the full YouTube URL into the tool. It supports regular videos, Shorts, Live links, and bulk lists, so you can skip manual ID extraction.

Open the Thumbnail Downloader →

2. Embed a video

A standard YouTube embed URL uses the video ID in this format:

https://www.youtube.com/embed/VIDEO_ID

YouTube's Help Center also provides the Share → Embed workflow if you prefer to copy the full iframe code rather than build the URL yourself.

3. Link to a specific moment

YouTube's Share interface can create a link that starts at a selected time. If you are constructing a standard watch URL yourself, the video ID stays unchanged and the timestamp is added as a separate parameter, for example:

https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=90s

4. Query the YouTube Data API

Developers can pass a video ID to YouTube Data API methods such as videos.list to request information about a specific video. What data is returned depends on the requested resource parts, permissions, and the video's availability.

Common Mistakes When Finding or Extracting a YouTube Video ID

  • Copying the playlist value. In watch?v=VIDEO_ID&list=PLAYLIST_ID, the value after list= is not the video ID.
  • Including a timestamp. Parameters such as &t=90s tell YouTube where to start playback; they do not change the ID.
  • Including a share parameter. A youtu.be link may end with ?si=.... The si value is separate from the 11-character video ID.
  • Assuming Shorts use a different identifier. Shorts still use a YouTube video ID; the URL path is simply /shorts/VIDEO_ID.
  • Treating any 11-character string as a valid video. Length and character pattern are useful validation checks, but they do not confirm that a real, public video exists.
  • Using thumbnail availability as proof that a video is live. CDN behaviour and cached images are not a dependable availability test. Use YouTube's player/API response when status matters.
  • Expecting a generic URL shortener to reveal the ID. If a link uses a service other than YouTube's own youtu.be, open or resolve the redirect first, then inspect the final YouTube URL.

Frequently Asked Questions

  • YouTube's IFrame Player API treats a video ID that does not have 11 characters as invalid. In normal YouTube watch, Shorts, live, and embed URLs, the video identifier you are looking for is therefore the 11-character value.

  • It appears immediately after /shorts/. For example, in youtube.com/shorts/dQw4w9WgXcQ, the video ID is dQw4w9WgXcQ.

  • It is the 11-character path immediately after youtu.be/. If the shared link has a parameter such as ?si=..., that extra parameter is not part of the ID.

  • No. A playlist adds a separate list= parameter. In a watch URL, the video ID remains the value after v=.

  • No. The MZ Tech Pro thumbnail downloader accepts a full YouTube URL, including regular videos, Shorts, and Live links, and extracts the video ID automatically.

  • No. Regex can extract a string that matches the expected ID pattern, but it cannot confirm that the video exists, is public, or can be played. Use YouTube's API or player response when you need an availability check.

Official Sources and Further Reading

Final Takeaway

For most people, finding a YouTube video ID is simply a matter of knowing which part of the URL to read. Start with v= on a normal watch page, the path after youtu.be/ on a shared link, or the value after /shorts/ for a Short. If the URL is awkward, Stats for Nerds gives you a second way to verify the ID. If you have dozens of links, use regex or Google Sheets instead of copying them one by one.

And if you came here only because you need thumbnail images, there is no need to isolate the ID first. Paste the complete link into the Bulk YouTube Thumbnail Downloader and let the tool handle the URL parsing for you.

Post a Comment