🧩 YouTube Embed Code Generator

Build clean, responsive 16:9 embed code for any public YouTube video with only the player parameters YouTube currently supports.

✅ Free · No sign-up
Embed code
Live preview

How to use the YouTube Embed Code Generator

  1. Paste the video link.
  2. Choose start/end times and player options. The code and preview update instantly.
  3. Copy the HTML into your site builder’s HTML/embed block, or download it as a snippet file.

Example

Input
https://youtu.be/dQw4w9WgXcQ, start 0:30, privacy mode
Output
<iframe src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ?start=30&rel=0" …>

Why creators use it

Good to know

Frequently asked questions

Is the generated code valid HTML?

Yes. The generator checks the iframe has a valid embed URL, a title for screen readers and the allow/referrerpolicy attributes YouTube recommends.

Can I embed private videos?

No. Private videos cannot be embedded. Unlisted videos can, and owners can disable embedding for any video.

What does privacy-enhanced mode do?

It uses the youtube-nocookie.com domain, which does not store cookies on your visitors’ devices until they interact with the player.

Related tools