YouTube Video ID Extractor
Pull the eleven-character video ID out of any YouTube link. Paste one, or a whole block of text with hundreds of links in it.
What a YouTube video ID is
Every video on YouTube has an eleven-character identifier made up of letters, numbers, hyphens and underscores — something like dQw4w9WgXcQ. That string is the only part of a YouTube URL that actually matters. Everything else is wrapping.
You need the bare ID whenever you are working with the YouTube API, building thumbnail URLs by hand, storing videos in a database, or feeding a list of videos into a script or spreadsheet.
Link formats this handles
| Format | Example |
|---|---|
| Standard watch link | youtube.com/watch?v=ID |
| Short link | youtu.be/ID |
| Shorts | youtube.com/shorts/ID |
| Embed URL | youtube.com/embed/ID |
| Live stream | youtube.com/live/ID |
| Legacy format | youtube.com/v/ID |
Extra parameters like &t=, &list=, &si= and tracking tags are ignored. Trailing brackets, commas and quotation marks are stripped, so links copied out of a document or a chat message still work.
Bulk extraction
You are not limited to one link. Paste an entire list, or a whole block of text with links buried in it — a message, a spreadsheet column, a chunk of HTML — and every YouTube link in it will be picked out. Anything that is not a YouTube video link is skipped and counted, so you can see at a glance whether something got missed.
Duplicates are removed by default. Untick that box if you need the results to line up one-to-one with your input.
Copy all the IDs as a plain list, or as CSV with the original link in a second column when you need to trace each ID back to where it came from.
Doing it manually
For a single standard link you do not need a tool at all. In youtube.com/watch?v=dQw4w9WgXcQ&t=42s, take the characters after v= and stop at the ampersand. For a youtu.be link, the ID is everything after the slash and before any question mark.
Where it gets awkward is the other formats, links with several parameters, and lists of more than a handful — which is what this page is for.
Frequently asked questions
Are IDs always eleven characters?
Yes for videos. YouTube has used eleven characters since the beginning and there is no sign of that changing. Playlist IDs and channel IDs are different lengths and are not video IDs — this tool ignores them.
Can I get an ID from a private or deleted video?
If you have the link, yes. The ID is read from the URL text itself, so nothing is requested from YouTube and it makes no difference whether the video still exists.
Is anything sent to a server?
No. Extraction happens entirely in your browser. Nothing you paste leaves your device.
Why was one of my links skipped?
Usually a truncated link, a channel or playlist URL rather than a video, or a shortened link from a service like bit.ly which has to be expanded first.