ADMISSIONS OPEN
🔥 Admissions Open • Book Your FREE Digital Marketing Demo Class • Limited Demo Slots Available • 🚀 Start Your Digital Marketing Career Today • 💼 Practical Training + Career Guidance • 🎯 Reserve Your Seat Before Today's Slots Fill
Book FREE Demo

YouTube Embed Code Generator

Paste a YouTube link to get clean, responsive embed code. Choose a start time, autoplay, mute, loop and privacy-enhanced mode, preview the video and copy the code for your website.

How to embed a YouTube video

  1. Copy the video link from YouTube’s address bar or the Share button.
  2. Paste it here and choose your options.
  3. Copy the embed code and paste it into an HTML block. In WordPress, use the Custom HTML block; in Elementor, use the HTML widget.
youtube embed code generator steps

Embed options explained

OptionWhat it does
ResponsiveThe video resizes to fit phones and desktops at 16:9
Start atBegins playback at a set time
Privacy-enhancedUses youtube-nocookie.com to limit cookies
AutoplayStarts playing on load, muted, as browsers require
LoopReplays the video when it ends
Lazy loadingThe player loads only when it is near the screen, helping page speed

Embeds and page speed

Each YouTube embed loads extra scripts, which can slow your page and hurt Core Web Vitals. Use lazy loading, which this code includes, avoid several embeds above the fold, and consider a click-to-play thumbnail on pages where speed matters most. Check the impact with the page weight budget calculator.

Create timestamp and subscribe links with the YouTube link generator, and add Video schema with the video schema generator so Google understands the video on your page.

More free tools and guides

More free tools like this youtube embed code generator
Learn this hands-on

Practise tools like this on real projects in our digital marketing course in Faridabad, with weekday, weekend and online batches.

See the courseAll free toolsAsk on WhatsApp
youtube embed code generator FAQ

Frequently Asked Questions

Is this YouTube embed code generator free?

Yes. It is free with no sign-up and works in your browser.

How do I make a YouTube embed responsive?

Wrap the iframe in a container with 56.25% bottom padding and position the iframe absolutely inside it. The code here does that for you.

Why does autoplay not work?

Browsers block autoplay with sound. The video must be muted to autoplay, which is why mute is added.

What is privacy-enhanced mode?

It loads the player from youtube-nocookie.com, which avoids storing tracking cookies until the viewer plays the video.

Scroll to Top