Free YouTube Embed Code Generator
A basic iframe works, but most sites need more: responsive sizing, autoplay, a start time, or privacy-enhanced mode. This generator builds a customized, copy-paste-ready YouTube embed with every common option — including a responsive 16:9 wrapper that looks right on any screen.
How to Use the YouTube Embed Code Generator
- Paste the YouTube video URL and set the size and start time.
- Toggle options like responsive layout, autoplay, loop, modest branding and privacy-enhanced mode.
- Click Generate embed code, then copy the snippet into your page.
Features
Options for responsive 16:9 layout, autoplay, mute, player controls, loop, modest branding, fullscreen, start time, and YouTube’s privacy-enhanced (nocookie) domain. Live preview shows exactly what visitors will see.
Benefits & Use Cases
Responsive embeds never break your layout on mobile, and privacy-enhanced mode avoids setting YouTube cookies before visitors press play — a plus for privacy-conscious sites.
Tips
Browsers block autoplay with sound, so pair Autoplay with Muted for it to work reliably. Looping requires the playlist parameter, which the tool adds automatically.
Frequently Asked Questions
What is privacy-enhanced mode?
It serves the player from youtube-nocookie.com, which does not set YouTube cookies until the visitor plays the video — helpful for privacy regulations.
Why doesn’t autoplay work?
Browsers block autoplay with sound. Enable the Muted option and autoplay will work in most browsers.
How does the responsive option work?
It wraps the iframe in a container that keeps a 16:9 aspect ratio while stretching to the full width of its parent — no fixed pixel sizes.
Can I make the video loop?
Yes. The Loop option adds loop=1 plus the required playlist parameter so the video restarts automatically.
What does modest branding do?
It reduces YouTube branding in the player controls for a cleaner embedded look.
Related Tools
YouTube Embed URL Generator
Generate YouTube embed URLs and iframe code free with NToolHub. Paste any video link, get a ready-to-paste player embed with a live preview.
Open tool →YouTube Video ID Extractor
Extract YouTube video IDs from any link free with NToolHub. Paste watch, youtu.be, Shorts or embed URLs and copy IDs instantly. No sign-up needed.
Open tool →YouTube Timestamp Link Generator
Create YouTube links that start at an exact moment free with NToolHub. Enter a video URL and timestamp to generate a shareable t= link instantly.
Open tool →YouTube Thumbnail Downloader
Download YouTube video thumbnails in HD free with NToolHub. Paste any video URL, preview every size, and save the image instantly. No sign-up.
Open tool →YouTube Channel URL Generator
Build clean YouTube channel URLs free with NToolHub. Generate handle links, video tabs and RSS feeds from a handle, name or channel ID. Try it now.
Open tool →