YouTube Embed Code Generator
Create YouTube embed code with start time, autoplay, loop and controls options, privacy-enhanced mode and a responsive size that fits any screen.
Create YouTube embed code with start time, autoplay, loop and controls options, privacy-enhanced mode and a responsive size that fits any screen.
About this tool
YouTube Embed Code Generator turns any YouTube link into an iframe you can paste into a website, blog or online course. Paste a watch, youtu.be, Shorts, live, mobile or music link, or just the 11-character video ID, and press Extract. A live preview plays the video with your settings. Set a start time in seconds to jump straight to the part that matters. Autoplay starts the video when the page loads; because browsers only allow autoplay for silent videos, the generator also adds mute=1, otherwise autoplay would quietly fail. Loop repeats the video; for a single video YouTube only loops when the video is also given as its own playlist, which the generator adds for you. You can hide the player controls, and related videos at the end are limited to the same channel. Privacy-enhanced mode, on by default, uses youtube-nocookie.com, so YouTube does not set tracking cookies on your visitors until they press play, which helps with privacy rules. Responsive mode, also on by default, makes the player fill the width of its container and keep its shape on every screen, instead of a fixed 560 × 315 box that overflows phones; turn it off for a fixed width and height. The code includes lazy loading, so the player does not slow down your page until it is scrolled into view, and a referrer policy that YouTube requires for some embeds. Copy the code and paste it into the HTML of your page.

Watch, Shorts, live, youtu.be or the video ID.
Start time, autoplay, loop, controls, privacy and size.
The player shows your settings live.
Paste the iframe into your page’s HTML.
Autoplay adds mute, loop adds the playlist parameter.
youtube-nocookie.com by default.
Fills any width and keeps its shape on phones.
The player waits until it is scrolled into view.
Watch, Shorts, live, music and short links.
No sign-up, runs in your browser.
Your video, on your page
Add a tutorial video next to written steps.
ExampleEmbed a how-to video starting at 1:30 where the steps begin.
Put lessons on your own course pages.
ExampleEmbed lesson videos without controls distractions.
Show a product demo where people decide.
ExampleAdd a muted, looping product video to a landing page.
Embed testimonials and explainer videos.
ExampleUse privacy-enhanced mode on a site that serves visitors in Europe.
Fast pages, happy visitors
Lazy loading stops a video from slowing down the rest of the page.
No YouTube cookies until a visitor presses play.
Autoplay is muted by browsers and can annoy readers.
Senior Software Engineer · Developer of Toolyconvert
Hemant developed YouTube Embed Code Generator and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.
Last updated 24 November 2026
Featured on
Toolyconvert is listed on these product directories and launch platforms.