All tools

YouTube Embed Generator

Build a custom YouTube iframe embed code.

Embed code

Generate YouTube Embed Code

Paste a YouTube link and this tool builds the iframe embed code for you, with toggles for autoplay, mute, controls, loop, start time, and privacy-enhanced mode. Copy the code or grab the live preview.

Options you can set

  • Width and height (or responsive)
  • Autoplay, mute, and player controls
  • Start time and loop
  • Privacy-enhanced (no-cookie) mode

Autoplay tip

Browsers block autoplay with sound, so if you enable autoplay you should also enable mute — otherwise most browsers will refuse to start the video automatically.

Privacy-enhanced mode

With privacy-enhanced mode on, the embed uses youtube-nocookie.com, which delays setting tracking cookies until the visitor actually plays the video. It's a simple way to be friendlier to privacy and cookie-consent rules.

Responsive embeds

The responsive option wraps the iframe in a 16:9 container that scales to its parent's width, so the video looks right on phones and desktops alike without a fixed pixel size.

Frequently Asked Questions

Common questions about the YouTube Embed Generator.

How do I embed a YouTube video?
Paste the video URL, choose your options, and copy the generated iframe code into your web page. A live preview shows exactly how it will look.
How do I make the embed autoplay?
Enable autoplay, and also enable mute — browsers block autoplay with sound, so a muted video is required for it to start automatically.
What is privacy-enhanced mode?
It uses youtube-nocookie.com, which delays setting tracking cookies until the visitor plays the video — friendlier to privacy and cookie-consent requirements.

More YouTube Tools

View all tools →
YouTube Thumbnail DownloaderYouTube Channel ID FinderYouTube Banner SizeYouTube URL ParserYouTube Earnings CalculatorBusiness Card MakerResume MakerQR Generator
File Transfer