YouTube Embed Code Generator — Responsive, Private and Fast

Paste any YouTube link — a video, a Short or a playlist — and get responsive embed code with privacy-enhanced mode, start and end times, muted autoplay, loop and captions, or the lite “click to load” version that keeps your page fast.

Runs in your browserUpdated

Preview

Embed code

In Webflow add an Embed element (or Site settings → Custom code) and paste the code; in WordPress use a Custom HTML block.

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the YouTube Embed Code Generator

  1. Paste a YouTube link — watch, youtu.be, Shorts or a link with &t=.
  2. Choose the responsive iframe or the lite version that loads the player on click.
  3. Set start/end time, autoplay (muted), loop, controls and captions.
  4. Copy the code into your page, Webflow Embed or WordPress Custom HTML block.

Lite embeds make pages faster

A normal YouTube embed loads about 1 MB of scripts before anyone presses play. The lite version shows the thumbnail and loads the player only on click — the best choice when a page has several videos. Privacy-enhanced mode (youtube-nocookie.com) stores no YouTube cookies until the video plays. Need Vimeo, Loom or another site? The Video Embed Code Generator handles them all.

Also searched as: responsive youtube embed, youtube embed code, youtube nocookie embed, youtube embed start time, lite youtube embed, embed youtube video html, youtube autoplay embed.

Tools that pair well with the YouTube Embed Code Generator

  • Vimeo Embed Code Generator — Paste a Vimeo link — public or unlisted (with its privacy hash) — and get a responsive embed with a clean player: no title, byline or portrait, optional autoplay, loop, start time and do-not-track mode.
  • Google Maps Embed Generator — Show your office, store or event on a Google Map without signing up for an API key.
  • Cookie Consent Banner Generator — Add a cookie consent banner to any site — Webflow, WordPress, Shopify or plain HTML — without a paid plugin.
  • Page Speed Test — Run Google Lighthouse on any URL for mobile or desktop.

Frequently asked questions

How do I embed a YouTube video responsively?
Use width: 100% with aspect-ratio: 16 / 9 on the iframe — the generated code does this, so it scales with its container.
How do I start a YouTube embed at a certain time?
Enter the start time (like 1:30) or paste a link with &t=90 — the embed gets start=90.
Why is autoplay muted?
Browsers only allow autoplay without sound; viewers can unmute with the controls.
Can I install YouTube Embed Code Generator as a web app and use it offline?
Yes. YouTube Embed Code Generator is an installable web app (PWA) — installed from your browser, not downloaded from an app store. Click Install app at the top of this page in Chrome or Edge (Windows, macOS, Linux, ChromeOS) or on Android, use Share → Add to Home Screen on iPhone and iPad, or File → Add to Dock in Safari 17+ on a Mac. It then opens in its own window with its own icon, and because it runs entirely in your browser it keeps working offline. Firefox on desktop can’t install web apps. How installing works.

Related tools