SmartCrafterAI

FreeToolSuite – Header Fixed
YouTube Embed Code Generator – Free YouTube Tool | SmartCrafterAI
▶️

YouTube Embed Code Generator

Generate customised YouTube embed code with autoplay, loop, privacy mode and responsive options. Live video preview. Standard iframe and responsive wrapper outputs.

✅ Free ▶️ Live Preview 📱 Responsive 🔒 Private
⭐⭐⭐⭐⭐4.9 / 5(9,102 ratings)
▶️YouTube Embed Code Generator
▶️ Enter a YouTube URL to generate customised embed code
▶️

Live Preview

See your embedded video render live as you configure options — no guessing.

📱

Responsive Code

Responsive wrapper output uses the 16:9 aspect ratio trick that fills any container width.

⚙️

Full Control

Autoplay, mute, loop, controls, related videos, fullscreen, start/end times and privacy mode.

🔒

Privacy-enhanced Mode

youtube-nocookie.com embed option avoids setting cookies for GDPR-compliant embedding.

⭐ User Reviews

4.9
⭐⭐⭐⭐⭐
Based on 9,102 verified reviews · 99% recommend
K
Kira B.
Yesterday
⭐⭐⭐⭐⭐
The live preview that updates as I toggle options means I can see exactly how the embed looks before copying. The privacy-enhanced mode for GDPR compliance is a feature I needed but couldn't find elsewhere.
YouTube Tools
F
Felix T.
3 days ago
⭐⭐⭐⭐⭐
The responsive wrapper code is perfect — the padding-bottom:56.25% technique works flawlessly across all screen sizes. The start time option to embed at a specific second is invaluable for long videos.
YouTube Tools
N
Nadia M.
1 week ago
⭐⭐⭐⭐⭐
Generating embed codes with autoplay+muted for website hero sections is a daily need. This tool outputs the correct combination of attributes every time without me having to remember the parameter names.
YouTube Tools
V
Vera K.
2 weeks ago
⭐⭐⭐⭐⭐
The no-cookie domain option (youtube-nocookie.com) saves me from adding cookie consent notices for embedded videos on EU-facing websites. Important compliance feature that's easy to miss.
YouTube Tools

📖 How to Use

1

Paste URL

Enter the YouTube video URL or ID in the top field.

2

Configure Options

Toggle autoplay, mute, loop, controls, privacy mode and other settings.

3

Set Dimensions

Choose width, height or use 100% for a responsive embed.

4

Copy Code

Copy the standard iframe or responsive wrapper — paste into your website HTML.

❓ FAQ

What is YouTube privacy-enhanced mode?+
Privacy-enhanced mode (youtube-nocookie.com) prevents YouTube from setting cookies on your site until the visitor plays the video. This helps with GDPR compliance and is recommended for sites with EU visitors.
How do I make a YouTube embed responsive?+
Use the responsive wrapper code: a container div with position:relative; padding-bottom:56.25%; height:0, and the iframe positioned absolute with width:100%;height:100%. This maintains 16:9 aspect ratio at any width.
Can embedded YouTube videos autoplay?+
Yes, but browsers require autoplay videos to also be muted to function. Check both Autoplay and Muted checkboxes together for reliable autoplay in all modern browsers.
What is the rel=0 parameter?+
rel=0 (or rel parameter set to 0) tells YouTube not to show related videos from other channels when the video ends — only related videos from your channel. This keeps viewers on your content.
How do I embed at a specific timestamp?+
Enter the start time in seconds in the Start at field. For example, 90 seconds = 1:30 in the video. You can also set an end time to stop playback at a specific point.
Scroll to Top