Skip to content
Free Tool Arena

Developer Utilities · Free tool

YouTube Embed Generator

Create customized YouTube embed codes instantly online. Set autoplay, loop, start time, and muted start with a live preview — completely free with no registration needed.

Updated June 2026
<iframe width="100%" height="400" src="https://www.youtube.com/embed/dQw4w9WgXcQ?mute=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

Live preview

Browsers block autoplay on videos with sound — that’s why "autoplay’ only works when "muted" is on. Use the modern privacy-friendly youtube-nocookie.com URL by replacing youtube.com with youtube-nocookie.com manually after copy if you need GDPR-light embedding.

Found this useful?EmailBuy Me a Coffee

Advertisement

What it does

Generate a fully-customized YouTube embed iframe. Paste any YouTube URL (full, short, embed, or just the 11- character ID) and configure all the playback options before copying: autoplay (must pair with muted in modern browsers — autoplay-with-sound is blocked everywhere), muted-start, loop (replay continuously), controls visibility, start time (jump to a specific second like 1:35 in the video), end time, and dimensions (width × height in px). Live preview shows exactly what visitors will see.

Use cases: blog posts and tutorials embedding a video example; landing-page hero videos (autoplay-muted- loop is the classic pattern — animation on first paint without surprise audio); course / documentation pages where the video is the canonical reference; portfolio / press kits showcasing work; community sites embedding talks, podcasts, or interview clips.

The generated iframe uses YouTube’s standard <iframe src="https://www.youtube.com/embed/..."> format. For privacy-respecting embeds (no cookies until the user clicks play), use the youtube-nocookie.com domain instead — same iframe, less tracking. The tool offers both options.

Embed this tool on your siteShow snippet

Paste this snippet into any page. Loads on-demand (lazy), no tracking scripts, and sized to most dashboards. Replace the height to fit your layout.

<iframe src="https://freetoolarena.com/embed/youtube-embed-generator" width="100%" height="720" frameborder="0" loading="lazy" title="YouTube Embed Generator" style="border:1px solid #e2e8f0;border-radius:12px;max-width:720px;"></iframe>
Embed docs →

How to use it

  1. Paste any YouTube URL or video ID. The tool extracts the 11-character ID from any common URL format.
  2. Set dimensions. 560×315 is YouTube's default; 720×405 for full-width embeds; 1280×720 for HD-quality presentation.
  3. Toggle autoplay (auto-plays on page load — modern browsers require muted=1 for this to work), muted, loop, controls, fullscreen.
  4. Optionally set a start time (seconds or H:MM:SS format) to jump to a specific moment, and an end time to cut off playback.
  5. Toggle 'No-cookie mode' if you want privacy-friendlier embedding — uses youtube-nocookie.com domain, blocks cookies until user interacts.
  6. Copy the iframe and paste into your HTML. Wrap in a responsive container (CSS aspect-ratio: 16/9) for mobile-friendly resizing.

When to use this tool

  • Embedding a YouTube video in a blog post, tutorial page, or landing page.
  • Building a hero video that autoplays muted on page load.
  • Linking to a specific timestamp in a long video — embed with start=120 jumps to 2:00.
  • Creating a playlist of embedded videos in a course or learning module.

When not to use it

  • When the video is private or restricted to specific regions — embeds will fail in those contexts.
  • AMP pages — YouTube's standard iframe isn't AMP-compatible. Use amp-youtube instead.
  • Performance-critical pages — every embed loads YouTube's full player + analytics. For lightweight previews, use a thumbnail image with a click-to-load mechanism (faster initial render, lower bandwidth).
  • When you specifically don't want YouTube tracking your visitors — even no-cookie mode loads the player itself; for full privacy, link to the video instead of embedding.

Common use cases

  • Educational use &mdash; demonstrating the underlying concept
  • Onboarding a colleague who needs the same calculation/conversion
  • Verifying a number or output before passing it on
  • Quick generation during a typical workday

Frequently asked questions

Why does autoplay require muted?
Modern browsers (Chrome since 2018, Firefox 2018, Safari 2017) block autoplay of videos with sound to prevent annoying surprise audio. Setting `muted=1` allows autoplay; users can unmute manually if they want sound. This is browser policy, not a YouTube limitation. Mobile browsers are even stricter — they may also require `playsinline=1`.
What's the difference between youtube.com/embed and youtube-nocookie.com/embed?
youtube-nocookie.com is YouTube's privacy-friendlier embed domain. It doesn't set tracking cookies until the user actually starts playback. Same player, same features. Use this for sites where you want minimal third-party tracking until interaction. Some users still trigger YouTube's tracking after clicking play, so it's not perfect — just better than the default.
How do I make the embed responsive?
Wrap in a CSS container with aspect-ratio: 16/9 and width: 100%. The iframe inside fills the container. Modern CSS aspect-ratio is supported in all modern browsers; for older support, use the padding-bottom: 56.25% trick (16:9 = 56.25%). Each gives you a video that scales fluidly with screen width while maintaining 16:9.
Can I disable YouTube's recommended-videos overlay?
Pre-2018: yes via `rel=0`. Post-2018: rel=0 only restricts recommendations to the same channel; you can't disable them entirely. YouTube made this change because the related-videos surface drives engagement on their platform. The tool's option labels this clearly.
What's the start time format?
Seconds (start=120 = jump to 2:00) or H:MM:SS in URLs (e.g. youtu.be/...?t=2m30s = 2:30). The tool accepts both and outputs the iframe-compatible seconds format.
Will the embed work on Substack / Notion / Medium / WordPress?
Substack: paste the URL, Substack auto-embeds. Notion: same. Medium: yes via the embed block. WordPress: paste into a Custom HTML block, or use the Embed Pro plugin. Square-bracket shortcodes [embed]URL[/embed] also work in WordPress.

Advertisement

Learn more

Explore more developer utilities tools

100% in-browserNo downloadsNo sign-upMalware-freeHow we keep this safe →

Found this useful?

The tools stay free thanks to readers who chip in or spread the word.

Buy Me a Coffee