YouTube Embed Code Generator

Create responsive embed code with autoplay, start time and more.

Runs instantly in your browser — results update as you type.

How do I embed a YouTube video responsively?

A responsive YouTube embed wraps the video iframe in a container with a 16:9 aspect ratio, so it scales to any screen width. Embed parameters such as start, autoplay, controls and loop customise how the player behaves.

How to use the YouTube Embed Code Generator

    Frequently asked questions

    How do I make a YouTube embed responsive?

    Wrap the iframe in a container with aspect-ratio: 16/9 and set the iframe to fill it. The generator does this for you.

    Why does autoplay not work?

    Browsers block autoplay with sound. Autoplay only works when the video is muted, which the generator adds automatically.

    What is youtube-nocookie.com?

    YouTube's privacy-enhanced mode. It does not set YouTube cookies until the viewer starts the video.

    How do I start a video at a specific time?

    Enter the start time in seconds. The embed code adds the start parameter, so 90 starts at 1:30.