YouTube Embed Code Generator
Paste a YouTube URL and generate clean iframe embed code with autoplay, mute, start/end time, loop, captions, controls, responsive layout, and privacy-enhanced youtube-nocookie mode.
Paste a YouTube URL and generate clean iframe embed code with autoplay, mute, start/end time, loop, captions, controls, responsive layout, and privacy-enhanced youtube-nocookie mode.
Free browser-side tool. No signup. Your video URL is only used to build the embed code.
YouTube's default Share > Embed button is fine for a basic iframe, but it is not built for people who need a specific player behavior. This free YouTube Embed Code Generator gives you the useful options in one place: autoplay, mute, controls, captions, loop, start time, end time, responsive sizing, and privacy-enhanced embeds.
Paste a video URL, choose the settings you want, preview the player, then copy the generated HTML into your website, CMS, blog post, documentation page, course page, or landing page.
Autoplay
Start playback automatically when the embed loads.
Mute
Required for reliable autoplay in modern browsers.
Start time
Begin the video at a specific second or mm:ss timestamp.
End time
Stop playback before the full video ends.
Controls
Show or hide the standard YouTube player controls.
Captions
Ask the player to show captions by default when captions are available.
Loop
Replay the same video using YouTube's required playlist parameter.
Related videos
Restrict recommendations to videos from the same channel where YouTube supports it.
Privacy-enhanced mode
Use youtube-nocookie.com instead of the standard YouTube embed domain.
Responsive layout
Wrap the iframe so it scales correctly on mobile and desktop.
PLAIN IFRAME
Drop-in HTML for any field
Use the plain iframe when your CMS already handles responsive video embeds or when a platform only accepts iframe HTML.
RESPONSIVE 16:9 WRAPPER
Scales cleanly on mobile and desktop
Use the responsive wrapper when you control the page HTML and CSS. It keeps the video at a stable 16:9 ratio, prevents layout overflow on mobile, and avoids the common problem where a fixed-width YouTube embed breaks a narrow page.
Most modern browsers block autoplay when video starts with sound. That is why this tool pairs autoplay with mute. A muted autoplay embed is much more likely to work, especially inside landing pages, product pages, and documentation pages.
Autoplay can still vary by browser, device, power-saving mode, and user settings. For the most predictable experience, keep controls visible so the viewer can start playback manually if the browser blocks autoplay.
Privacy-enhanced mode changes the iframe domain from youtube.com to youtube-nocookie.com. This can reduce cookie behavior before playback starts, which is useful for websites with stricter privacy expectations.
It is not magic compliance by itself. The YouTube player still loads external resources, and your site may still need the right consent or privacy disclosures depending on your audience and legal requirements.
Start and end times are converted into the parameters YouTube expects. You can enter seconds or timestamp-style values like 1:23.
Looping a single YouTube video has one awkward detail: YouTube requires the same video ID to be passed as the playlist parameter. The generator adds that automatically, so you do not have to remember the syntax.
Paste a YouTube video URL, Shorts URL, youtu.be link, embed URL, or raw video ID.
Choose player options: autoplay, mute, controls, captions, loop, related-video behavior, and privacy-enhanced mode.
Add optional start and end times in seconds or mm:ss format.
Pick plain iframe or responsive 16:9 wrapper.
Preview the embed and copy the final HTML.
Embed the video where it actually helps the page
A YouTube embed should support the page's purpose. Put demos near product explanations, tutorials near step-by-step instructions, and testimonials near proof sections. A video buried at the bottom of a page rarely gets watched.
Keep the surrounding page fast
YouTube embeds can add weight to a page. If performance matters, avoid stacking many embeds on one page, use one primary video per section, and consider lazy-loading embeds inside your site template.
Use a responsive wrapper for mobile traffic
Fixed-size iframes often look fine on desktop and break on mobile. A responsive wrapper keeps the player inside the viewport and makes the embed usable across phones, tablets, and wide screens.
Do not rely on embeds alone for SEO context
Search engines still need readable page content around the video. Add a clear heading, short summary, transcript excerpt, or supporting copy so the page has context beyond the iframe.
Use these alongside the embed when shipping a page that hosts a YouTube video.
Thumbnail Downloader
Pull thumbnails to use alongside the embed.
OpenChapter Generator
Format timestamps for the description and on-page outline.
OpenChannel ID Finder
Find the permanent UC channel ID for APIs and RSS feeds.
OpenDescription Generator
Generate a publish-ready YouTube description.
OpenVideo Audit
Audit the embedded video's title, description, and tags.
OpenAll Publish tools
Browse the rest of the publish workflow.
OpenPaste a video URL and pick the options you need. The HTML is ready to copy in seconds.