YouTube tool

YouTube Embed Code Generator

Create responsive embed code with autoplay, loop and more.

Free Runs in your browser

About this tool

This generator builds the HTML you need to put a YouTube video on your website. It is responsive, so the video scales on mobile, and you can turn on options like autoplay, loop and privacy-enhanced mode.

How to use YouTube Embed Code Generator

  1. Paste the YouTube link.
  2. Tick the options you want and set a start time.
  3. Copy the code and paste it into your page.

Questions people ask

Why does autoplay not work?

Browsers block autoplay with sound. Turn on “Mute” together with autoplay and it will start on its own.

What is privacy-enhanced mode?

It uses youtube-nocookie.com, so YouTube does not store cookies for visitors until they play the video.

How do I make the embed responsive?

The generated code wraps the iframe in a container with a 16:9 aspect ratio, so it resizes with the page.

More youtube tools

See all 10 →
Esc