Video Embed Code Generator — YouTube, Vimeo, Loom and More

Paste a video link from YouTube, Vimeo, Loom, Wistia, Dailymotion, Twitch, Streamable, Google Drive or Facebook — or a direct MP4/WebM file — and get clean, responsive embed code that keeps its 16:9 (or 9:16) shape on every screen. Turn on privacy-enhanced mode (youtube-nocookie.com), set a start and end time, autoplay muted, loop or hide controls — or choose the lite “click to load” version that shows only a thumbnail until clicked, so your page stays 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 Video Embed Code Generator

  1. Paste a video link — YouTube (watch, youtu.be, Shorts), Vimeo, Loom, Wistia, Dailymotion, Twitch, Streamable, Google Drive, Facebook or a direct .mp4 file. The platform, ID and start time are read from it.
  2. Choose a responsive iframe, or the lite version that loads the player only when clicked (much faster pages).
  3. Set the start and end time, autoplay (always muted — browsers block autoplay with sound), loop, controls and captions.
  4. Copy the code into an Embed element (Webflow), a Custom HTML block (WordPress) or your page. Options a platform’s player doesn’t support are hidden.

Supported platforms

YouTube (privacy-enhanced mode, start/end, captions, lite mode), Vimeo (including unlisted links with a hash, do-not-track), Loom, Wistia, Dailymotion, Twitch (videos, clips and live channels — Twitch requires the domains you embed on), Streamable, Google Drive (files shared with “Anyone with the link”), Facebook videos and your own MP4/WebM files with the HTML5 <video> element.

Responsive without wrapper hacks

The code uses the CSS aspect-ratio property, so the video fills its container’s width and keeps its shape — no padding-bottom trick needed. Vertical Shorts use 9:16 and are limited in width so they don’t become huge on desktop.

Why the lite version is faster

A regular YouTube embed loads around 1 MB of scripts before anyone presses play, which hurts Largest Contentful Paint and Total Blocking Time. The lite version shows only the video’s thumbnail and a play button; the real player loads on click and starts immediately. Use it whenever a page has more than one video or the video isn’t the first thing people see.

OptionParameter
Privacy-enhanced modeyoutube-nocookie.com domain
Start / endstart, end (seconds)
Autoplayautoplay=1&mute=1
Looploop=1&playlist=ID
Captionscc_load_policy=1
Related videosrel=0 (same channel only)

Also searched as: youtube embed code generator, vimeo embed code, responsive video embed, loom embed, embed video html, wistia embed code, twitch embed, lite youtube embed.

Tools that pair well with the Video Embed Code Generator

  • 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.
  • OG Image Generator — Create a polished link-preview image for Facebook, LinkedIn, X, Slack and WhatsApp in seconds — pick a template, type your title, add a logo, then download the PNG and matching meta tags.

Frequently asked questions

Which video sites are supported?
YouTube, Vimeo, Loom, Wistia, Dailymotion, Twitch, Streamable, Google Drive and Facebook, plus direct MP4, WebM and MOV links, which get an HTML5 video tag.
How do I make a video embed responsive?
Give the iframe width: 100%, height: auto and aspect-ratio: 16 / 9 in CSS — the code here does that, so the video scales with its container on every screen.
Why doesn’t autoplay work with sound?
Browsers only allow autoplay when the video is muted. Ticking Autoplay adds mute=1; viewers can unmute with the player controls.
How do I start a YouTube embed at a specific time?
Enter the time in Start at (like 1:30) or paste a link with &t=90 — the embed gets start=90. End at stops the video at that point.
What does privacy-enhanced mode do?
It loads the player from youtube-nocookie.com, which doesn’t store YouTube cookies until the visitor plays the video — helpful for GDPR and cookie banners.
Can I install Video Embed Code Generator as a web app and use it offline?
Yes. Video 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