Embed Code Generator
Paste a YouTube video URL and generate a ready-to-use iframe embed code, with options for size, autoplay, looping, and a custom start time.
Recommended Settings
Pro Tips
- •Most browsers block autoplay with sound - autoplaying embeds typically need to start muted to work reliably
- •Looping a single video requires YouTube's embed player to treat it as a one-video playlist, which this tool handles automatically
- •Hiding player controls doesn't prevent viewers from pausing, since YouTube still allows basic keyboard/click interaction on embeds
- •Use the start time option to link directly into a specific moment, great for tutorials or highlight clips
Most Popular
Most users use the default 560x315 size with controls enabled and autoplay off, matching YouTube's own default embed code
When to Use This Tool
Get the iframe code needed to embed a YouTube video on any web page.
Create a looping video embed for a landing page or background element.
Link directly to a specific timestamp within a longer tutorial video.
Adjust size and control visibility to match a page's design.
How It Works
Extract the video ID from your pasted URL
Build YouTube's embed URL with your chosen parameters for autoplay, looping, controls, and start time
Wrap it in a standard iframe tag with your specified dimensions, ready to paste into any HTML page
100% Private
Files never leave your device. All processing happens locally in your browser.
Lightning Fast
Powered by YouTube IFrame Player embed URL format for optimal performance on modern browsers.
Open Source
Built with verified, open-source libraries. Fully transparent.
Frequently Asked Questions
Why won't autoplay work when I test the embed?
Most modern browsers block autoplaying video with sound as a user experience protection - autoplay generally only works reliably if the video is also muted, which isn't controllable through this basic embed parameter alone.
Can I loop just a section of the video?
The loop option replays the entire video from the start each time - looping only a specific segment isn't supported by YouTube's standard embed parameters.
Does hiding controls stop viewers from pausing the video?
No, YouTube's embed player still allows basic interactions like clicking to pause even when the visible controls are hidden.
Is my data sent to a server?
No. The embed code is generated entirely in your browser - only the preview iframe itself loads directly from YouTube, the same as embedding it on any website.
Can I embed a private or unlisted video?
Unlisted videos can be embedded normally. Private videos generally cannot be embedded for viewers who don't have explicit access, regardless of embed settings.