Technical
YouTube Embed Code Generator Guide
A YouTube embed lets you place a video inside a webpage. The key is the 11-character video ID, which can be converted into an embed URL.
When to use this page
Use this page when you need to embed a YouTube video on a website.
Start with the video ID
Every embed URL uses the video ID. If you have a watch URL or short URL, extract the ID first, then place it into the embed URL format.
- Watch URL contains v=
- Short URL contains the ID after youtu.be
- Embed URL uses /embed/VIDEO_ID
Use responsive containers
Embeds should scale correctly on mobile and desktop. Use a 16:9 responsive container so the video does not stretch or overflow.
- Keep the aspect ratio
- Test on mobile
- Avoid fixed widths in narrow layouts
Examples
Related ShortformLab tools
Youtube Video Id Finder
Open this related workflow to continue refining your creator metadata and publishing process.
Thumbnail Downloader
Open this related workflow to continue refining your creator metadata and publishing process.
Youtube Thumbnail Size Guide
Open this related workflow to continue refining your creator metadata and publishing process.
Frequently asked questions
Where do I find the video ID?
Use the Video ID Finder or copy the 11-character ID from the YouTube URL.
Can I embed Shorts?
Many Shorts can be embedded using the same video ID format, but the display experience depends on the page layout.