YouTube Embed Code Generator (Responsive) | SociableKIT

Free tool

YouTube Embed Code Generator

Paste a link. Get clean, responsive iframe code. Works on any website.

The short answer

This free generator turns a YouTube link into clean, responsive iframe embed code. Paste the link, choose options like privacy-enhanced mode, lazy-load and start time, then copy the code into your page. It runs in your browser.

Free · No sign-up · Updated December 5, 2026

If the video owner turned off embedding, or the video is age-restricted, it won't play on your site. Private or deleted videos can't be checked here, so use Load preview.

Your code

Your code appears here.

Preview loads the video from YouTube.

How to embed a YouTube video on your website

  1. Paste your YouTube link above.
  2. Choose your options. Keep Privacy-enhanced mode on, and Responsive on.
  3. Copy the code and paste it where the video should appear (an HTML block in WordPress, Wix, Squarespace or Webflow, or your page's HTML).

Why these defaults?

  • Responsive: the video scales with the page on phones and desktops.
  • Lazy-load: the video loads when it's near the screen, so your page loads faster.
  • Privacy-enhanced mode: YouTube's own option. It prevents views of the embedded video from personalizing a visitor's YouTube experience. It is not the same as "no cookies", and it doesn't replace consent where the law requires it.
  • Referrer policy: needed so YouTube plays the video instead of showing Error 153.

Embedding many videos?

Twenty players on one page are slow. Show a gallery instead.

Sources: YouTube Help, embed videos and playlists · MDN, the iframe element.

More than one video?

Need more than one video? Show your whole channel.

One embed shows one video. A SociableKIT YouTube widget shows your whole channel or playlist in a clean gallery, and updates on its own on paid plans (manual sync on Free).

  • No code. Matches your brand. Works on any website.

Start free. Paid plans from $10/month. See pricing

FAQ

Questions, answered

How do I embed a YouTube video on my website?

Paste the video link into the generator, copy the code, and paste it into an HTML block on your page. On YouTube itself you can also use Share > Embed.

How do I make a YouTube embed responsive?

Put the iframe inside a wrapper with a fixed aspect ratio and make the iframe fill it. The generator does this for you with aspect-ratio: 16 / 9.

What is YouTube Error 153?

YouTube requires embeds to send a HTTP Referer. If it's missing, viewers see Error 153 and can only watch on YouTube. Add referrerpolicy="strict-origin-when-cross-origin" to the iframe, which the generator always does. Also make sure your site doesn't send a no-referrer policy.

Why does my embed show Error 153 when I open the file from my computer?

Opening the player directly, or from a local file, has no enclosing website to give a Referer. Test on a live page or a local web server.

What does privacy-enhanced mode do?

It uses youtube-nocookie.com. YouTube says views of an embedded video in this mode are not used to personalize the viewer's YouTube experience or ads. It does not remove all cookies or the need for consent where it's required.

How do I lazy-load a YouTube embed?

Add loading="lazy" to the iframe so the browser loads it when it's near the viewport. The generator has this on by default.

How do I start a video at a specific time?

Set Start at. The generator adds start= in seconds to the embed link. For example 1:30 becomes start=90.

How do I autoplay an embedded video?

Turn on Autoplay. Most browsers only autoplay muted video, so the generator also turns on Mute. YouTube says autoplayed embedded videos don't count as views.

Why won't my video play in the embed?

Common reasons: the owner turned off embedding, the video is age-restricted, the video is private or deleted, or the embed has no Referer (Error 153).

Can I embed a whole playlist?

Yes. Paste the playlist link and the generator creates a playlist embed. To show an entire channel as a gallery, use the SociableKIT YouTube widget.

My page is slow with many videos. What can I do?

Use lazy-load, embed fewer players per page, or show your videos in one gallery widget instead of many separate players.

Do I need to sign up or pay?

No. The generator is free, needs no account, and runs in your browser. It sends nothing to SociableKIT.

How do I embed a video on WordPress?

Add a Custom HTML block, paste the generated code, and save. Or paste the YouTube link into a normal block and WordPress will embed it for you; use the generator when you want privacy mode, start time or other options.