YouTube Embed Code Generator

Video & options

Works with watch, youtu.be, Shorts and embed links.

Embed code

Preview

How to embed a YouTube video

  1. Copy the video link from YouTube (the Share button or the address bar).
  2. Paste it above and choose a size. “Responsive” fits any screen width.
  3. Set a start time or autoplay if you need them.
  4. Copy the code and paste it into an HTML block in WordPress, Blogger, Shopify or any website.

Frequently asked questions

What is privacy-enhanced mode?

It loads the video from youtube-nocookie.com, which does not set YouTube tracking cookies until the visitor plays the video. It is a good default for sites that need to respect privacy laws such as GDPR.

Why does autoplay start muted?

Most browsers block videos that autoplay with sound, so the code adds mute=1 to make sure autoplay works.

Why won’t some videos play when embedded?

The video owner can turn off embedding. Age-restricted and some music videos also cannot be played on other websites.