1001Ferramentas
▶️Utilities

YouTube Embed Builder

Builds a YouTube embed <iframe> from the video ID with customizable width and height.


  

Hand-building a YouTube iframe

You need a video inside a page, an internal wiki or a CMS that only accepts raw HTML, and the Share button is not handy (or the video belongs to someone else and all you have is the link). Fill in the video ID plus width and height and the iframe comes out assembled, including the allow and allowfullscreen attributes the player needs for fullscreen and picture-in-picture.

The field wants the ID, not the URL. The builder strips anything that is not a letter, digit, hyphen or underscore, so pasting a whole link produces a mashed-together ID and a video that never loads. The ID is the 11 characters after v= in a watch?v=... link, or the part after the slash in a youtu.be link. Playlists use a different parameter and are not covered here.

Width and height go straight into the attributes, so type numbers only. And 560 by 315 is a fixed size: in a responsive layout, wrap the iframe in a div with aspect-ratio 16/9 and width 100%, otherwise it overflows on phones. There is no copy button, so select the code and copy it yourself. There are no options for autoplay, a start timestamp or the youtube-nocookie domain either; edit the src by hand for those. All of it is assembled in the browser.

Frequently asked questions

Where do I find the video ID?
In the URL. For youtube.com/watch?v=dQw4w9WgXcQ the ID is dQw4w9WgXcQ, and for a youtu.be link it is the part after the slash. It is always 11 characters.
How do I make the video start at 1:30?
Append ?start=90 to the src in the generated code. The builder does not add playback parameters for you.
Why does my embed say the video is unavailable?
The owner can disable embedding, or the video is private or age restricted. The markup is fine; the permission belongs to the channel.

Related Tools