YouTube Embed Code Generator

YouTube

Paste a video link and choose the options. You get the iframe code, a responsive version that fits any screen width, and a preview of exactly what will play.

Works with watch links, youtu.be links, Shorts links, or the 11-character ID on its own
CREATOR DASHBOARD & WATCHLIST

Track channels & monetization daily

Save up to 3 channels free — or upgrade to Pro ($9/mo) for 100 channels, Monday mover digests & CSV exports.

Open Creator Dashboard
DONE-FOR-YOU YOUTUBE SEO

Want an expert to optimize your channel?

Hire founder Nasir Uddin to audit your channel, research keywords, and write high-CTR titles, descriptions & tags.

See YouTube SEO Packages →

How this number is made

  1. Options are YouTube's documented embedded-player parameters: start, end, autoplay, mute, loop, cc_load_policy and controls.
  2. Browsers only allow autoplay with sound off, so autoplay works reliably when Start muted is also on.
  3. Privacy-enhanced mode uses youtube-nocookie.com, which YouTube describes as not storing information about visitors unless they play the video.

Next steps

YouTube Timestamp Link Generator

Make a YouTube link that starts at any moment: watch link, short link and embed code.

YouTube Subscribe Link Generator

A link that opens your channel with the subscribe prompt already showing, plus a button and text versions to paste.

YouTube Thumbnail Downloader

Grab any video's thumbnail in every size YouTube stores, straight from the source.

YouTube Subscriber Count Checker

Look up any channel's subscribers, views, uploads and average views per video.

How to embed a YouTube video

The preview plays exactly what the code will show, so you can check the start time and options before you publish.

  1. Paste the video's link.
  2. Choose a start and stop time if you only want part of it, and the player options you need.
  3. Pick a fixed size or Responsive, copy the embed code and paste it into your page's HTML.

The options

OptionParameterWhat it does
Start atstartBegins playback at that second
Stop atendStops playback at that second
Autoplayautoplay=1Starts playing when the page loads; browsers usually require it to be muted
Start mutedmute=1Starts without sound
Looploop=1 with playlist=IDPlays the video again when it ends; a single video needs the playlist parameter too, which the tool adds
Captions oncc_load_policy=1Shows captions by default, where the video has them
Hide controlscontrols=0Removes the player controls
Privacy-enhanced modeyoutube-nocookie.comUses YouTube's privacy-enhanced domain

Responsive or fixed size

A fixed size like 560 x 315 can overflow on phones. The responsive code wraps the player in a box that keeps a 16:9 shape and fills the width of whatever it sits in, which suits most modern sites and page builders.

Squarespace, WordPress and Wix all accept the code in an HTML or embed block.

When the video will not play

For a plain link that starts at a moment instead of an embed, use the timestamp link generator.

  • The owner turned off embedding. The preview shows an error; only the owner can change it.
  • The video is private, or age-restricted, which cannot be played in an embed.
  • Autoplay with sound is blocked by the browser. Turn on Start muted.

Frequently asked questions

How do I make an embedded YouTube video start at a certain time?

Type the time in Start at, for example 1:30. The tool converts it to seconds and adds start=90 to the embed code.

Why does autoplay not work?

Most browsers block videos that start playing with sound. Turn on Start muted together with Autoplay and it will start on its own.

What is privacy-enhanced mode?

An embed from youtube-nocookie.com. YouTube says that in this mode it does not store information about visitors to your site unless they play the video.

Can I embed a YouTube Short?

Yes. Paste the Shorts link; the tool uses the video's ID, so the Short plays in the standard embedded player.