Free · No login · Custom options
YouTube Embed Code GeneratorPaste a link, copy the iframe
Set the size, start time, autoplay, and loop, then copy a ready-to-paste embed code for your website or blog.
Advertisement
What goes into the embed code
The generator builds a standard YouTube <iframe> pointed at youtube.com/embed/{videoId}, with your chosen width, height, and any of autoplay, loop, hidden controls, or a custom start time appended as query parameters. It's the same format YouTube's own "Share → Embed" panel produces.
A note on autoplay
Browsers generally only allow autoplay when the video starts muted, or after the visitor has already interacted with the page - this is a platform-level restriction, so an embed code alone can't force sound-on autoplay everywhere.
Questions
Frequently asked
Paste the video link above, choose your size and options, then copy the generated <iframe> code and paste it directly into your page's HTML.
Yes - enter a start time in seconds and the embed will jump straight to that point when played.
Most browsers block audio-on autoplay unless the tab is already muted or the user has interacted with the site - this is a browser policy, not something the embed code can override.
Yes - paste a /shorts/ or /live/ link and the generator extracts the correct video ID either way.
Advertisement