Zero Signup ToolsFree browser tools

Generator Tools

YouTube Embed Generator

Build a customized YouTube iframe embed in your browser. Set start and end times, autoplay, mute, loop, captions, language, and a responsive 16:9 wrapper.

Video ID: dQw4w9WgXcQ

Playback timing

Start at

End at

Stop playback at a specific time.

Player controls

Display and language

Used by screen readers and required for Lighthouse accessibility.

Progress bar color

White hides the suggested-content thumbnails at the end of the video.

IETF BCP 47 language tag for the player chrome.

Falls back to YouTube's detection if the video has no track in this language.

Output size

Sizing

Aspect ratio

Set to 0 for square corners. Higher values round the wrapper.

Live preview

Shows the embed exactly as it would render on your page. The video loads from youtube-nocookie.com only after you click Show preview.

Thumbnail for video dQw4w9WgXcQ

Preview ready when you are

Watch URL: https://www.youtube.com/watch?v=dQw4w9WgXcQ

HTML embed code

<div style="aspect-ratio: 16 / 9; width: 100%; max-width: 800px;">
  <iframe
    src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ?rel=0"
    title="YouTube video player"
    style="width: 100%; height: 100%; border: 0;"
    allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin" allowfullscreen
  ></iframe>
</div>

Responsive wrapper uses CSS aspect-ratio so the iframe scales with its parent container at every breakpoint.

Fixed-size fallback

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ?rel=0" title="YouTube video player" frameborder="0" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

React / JSX

<div style={{ aspectRatio: "16:9", width: "100%", maxWidth: 800 }}>
  <iframe
    src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ?rel=0"
    title="YouTube video player"
    style={{ width: "100%", height: "100%", border: 0 }}
    allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerPolicy="strict-origin-when-cross-origin"
    allowFullScreen
  />
</div>

Embed URL

https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ?rel=0

How to use

  1. Paste a YouTube URL, /shorts/ link, /live/ link, or the 11 character video ID. The tool detects the ID and reports it under the input.
  2. Set a start and (optionally) end time in hours, minutes, and seconds. Click Read timestamp from URL to pull an existing ?t=1m30s into the start field.
  3. Toggle the player controls you want: autoplay, mute, loop, modest branding, captions, related videos, fullscreen button, playsinline on iOS, and so on.
  4. Set the accessible iframe title (required by screen readers and Lighthouse), the interface language hl, and the default caption language cc_lang_pref if needed.
  5. Pick Responsive sizing (CSS aspect-ratio that fills any container) or Fixed pixels (classic width and height). Set an optional border-radius for rounded corners.
  6. Click Show preview to load the live iframe, then click Copy HTML for the responsive snippet, Copy JSX for the React version, or Copy embed URL for the raw src.

About this tool

YouTube Embed Generator builds a customized iframe for any YouTube video, channel-uploaded video, Short, or live stream. Paste any youtube.com, youtu.be, youtube-nocookie.com, /shorts/, /live/, /embed/, /v/, m.youtube.com, or music.youtube.com URL, or the bare 11-character video ID, and the tool pulls out the ID and assembles the embed for you. Every parameter exposed by the YouTube IFrame Player API is in the panel: start and end timestamps in hours, minutes, and seconds (with a Read timestamp from URL helper for links that already carry ?t=1m30s); autoplay and mute (paired because every modern browser blocks autoplay unless the video starts muted); loop with the playlist=VIDEO_ID workaround that single-video loops require; controls visible or hidden; modestbranding to drop the YouTube logo from the controls bar; rel for the related-videos behaviour at the end of the video (off shows only the same-channel suggestions, on shows the full grid); cc_load_policy to force captions on; hl for the interface language and cc_lang_pref for the default caption track (both as IETF BCP 47 tags like en, fr, ja, pt-BR); color red or white for the progress bar; fs for the fullscreen button and matching allowfullscreen attribute; iv_load_policy for in-video cards and annotations; playsinline for inline playback on iPhone Safari instead of jumping into the native full-screen player; and disablekb to lock out keyboard shortcuts. Privacy-enhanced mode is on by default so the iframe points at youtube-nocookie.com and YouTube does not write tracking cookies until the visitor clicks play. Three output snippets are ready to copy: a responsive wrapper with CSS aspect-ratio so the embed fills any container at any breakpoint (with 16:9, 4:3, 1:1, 21:9, and 9:16 vertical options for Shorts), a classic fixed-width iframe at the 560x315 size YouTube itself emits from the share dialog (configurable up to 1920x1080), and a React/JSX version with camelCased style props and allowFullScreen, ready to paste into a Next.js, Vite, or CRA component. An optional border-radius wraps the iframe in a rounded container without breaking the responsive math. A live preview shows the exact embed before you copy. Useful for blog posts, marketing pages, course materials, documentation sites, knowledge bases, Webflow and WordPress page builders, MDX content, README files, and any place a richer YouTube embed is needed than the default share-dialog snippet. The accessible iframe title field is required by every major accessibility audit (Lighthouse, axe, WAVE); the tool sets a sensible default and lets you override it. Parsing, URL construction, and code generation run entirely in your browser, so the URLs, video IDs, and titles you type never leave your device.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsGenerator Tools