logo
SosialHits Free Online Tools Hub
YouTube Embed Generator
Paste any YouTube URL, configure your options, and get a custom embed code — with a live preview that updates in real time.
Paste a YouTube URL above and click Load Video.

Player Options

Autoplay

Start playing automatically on load

Muted

Required for autoplay in most browsers

Loop

Replay video after it ends

Show Controls

Display player controls bar

Fullscreen Button

Allow viewers to go fullscreen

Hide Related Videos

Don't show suggested videos at end

Privacy-Enhanced Mode

Uses youtube-nocookie.com (GDPR)

Start & End Time

Format: mm:ss or total seconds (e.g. 1:30 = 90s)

Embed Size

Responsive embeds scale to 100% width automatically.

Live Preview

Paste a YouTube URL and click Load Video
to see a live preview here

Generated Embed Code

Responsive Wrapper Code

Keeps 16:9 ratio on all screen sizes

Embed YouTube videos the right way
Our embed generator gives you full control over every player parameter — live preview included, no manual coding needed.
Live Preview
Live Preview
See exactly how your embedded video will look before copying the code — updates in real time as you change options.
Full Control
Full Control
Configure autoplay, loop, mute, controls, fullscreen, related videos, and privacy mode with simple toggles.
Start & End Time
Start & End Time
Embed only a specific segment of any YouTube video by setting a custom start and end timestamp.
Responsive Code
Responsive Code
Get a responsive wrapper that maintains the 16:9 ratio on all screen sizes — ready to paste into any website.
Privacy Enhanced
Privacy Enhanced
Enable privacy-enhanced mode to use youtube-nocookie.com and stay GDPR-compliant — no tracking until play.
Size Presets
Size Presets
Choose from common sizes (560×315, 1280×720, etc.) or enter a custom width and height.
100% Free
100% Free
No login, no API key, no limits. Works entirely in your browser.
Any YouTube URL Format
Any YouTube URL Format
Supports watch URLs, short youtu.be links, and embed URLs — the tool extracts the video ID automatically.
Frequently Asked Questions

How do I embed a YouTube video on my website?

What does autoplay do and why do I need mute?

What is Privacy-Enhanced Mode?

How do I embed only part of a YouTube video?

What YouTube URL formats are supported?

What is the difference between iframe code and responsive wrapper code?

How do I hide the related videos that appear at the end?

Can I loop a YouTube embed?

Will hiding controls affect the video?

Is this tool completely free?