Toolastic

YouTube Embed Code Generator

Generate a custom YouTube embed iframe with the exact options you need, then copy and paste.

Live preview

Your privacy is safe, this tool runs entirely in your browser. Nothing you enter is uploaded to or stored on our servers.

Did this tool work for you?

More YouTube Tools

How to use YouTube Embed Code Generator

  1. 1Paste a YouTube link or video ID.
  2. 2Choose your options, size, autoplay, start time, controls and more.
  3. 3Copy the generated embed code.
  4. 4Paste it into your website’s HTML.

Frequently asked questions

How do I embed a YouTube video in HTML?

Paste your video link above, choose your options and copy the generated <iframe> code, then paste it anywhere in your page’s HTML where you want the video to appear. No coding needed.

How do I make a YouTube video start at a specific time?

Set the “Start at” time in seconds, the tool adds the start parameter to the embed so the video begins exactly where you want.

How do I make a YouTube embed responsive?

Turn on “Responsive” and the embed scales to fit its container at a 16:9 ratio, so it looks right on mobile and desktop without a fixed width.

Can I embed a YouTube video without showing related videos?

Yes. Modern YouTube embeds limit related videos to the same channel, and you can hide extra UI with the controls and info options before copying the code.

Does autoplay always work?

Browsers usually require the video to be muted for autoplay to work, so enabling autoplay also suggests muting to keep it reliable.

Is the embed code generator free?

Yes, completely free with no sign-up, and the code is generated in your browser.

Popular tools