EN

YouTube Embed Code Generator

Runs in your browser

Source

Options









Preview

< waiting for a YouTube URL >

Nothing typed here is sent anywhere. Code is generated client-side and only reaches YouTube once the preview actually loads or plays. Independent tool, not affiliated with YouTube or Google.

Paste any YouTube link and get a responsive, privacy-friendly embed code with full control over playback: start time, autoplay, loop, hidden controls, Shorts format, playlists and lazy-loading. Free, no account, nothing stored.

More tools

Frequently asked questions

What is a YouTube embed code?

A YouTube embed code is a small piece of HTML, an <iframe>, that lets you show a YouTube video directly on your own website instead of just linking to it. Visitors can watch the video without leaving your page.

What is youtube-nocookie.com?

youtube-nocookie.com is a privacy-enhanced version of the YouTube player. When you embed a video from this domain, YouTube does not store cookies for tracking on a visitor’s browser until they actually press play, which helps with privacy regulations such as the GDPR.

Is embedding a YouTube video legal?

Yes. YouTube’s own embed feature is built for this purpose and is free to use for any video that has embedding enabled by its owner. This is different from downloading or converting a video, which is not something this site offers.

Does a responsive embed slow down my website?

Not if you use lazy-loading. Our generator can add loading=”lazy” so the video player only loads once a visitor scrolls near it, which keeps your initial page load fast.

Do I need an account to use these tools?

No. Every tool on this site runs directly in your browser. There is no sign-up, no login and nothing is uploaded to a server.

Can I embed a YouTube Short?

Yes, the embed code generator detects Shorts URLs and can output a vertical, Shorts-sized embed automatically.

Can I make the video start at a specific time?

Yes. Enter a start time (and optionally an end time) in the generator, or use the separate timestamp link generator to create a shareable “watch from this moment” link.

How to use the YouTube embed code generator

  1. Copy any YouTube link (a normal watch link, a Shorts link, a youtu.be link, or a playlist link) and paste it into the URL field above.
  2. Choose your options: privacy-enhanced mode, responsive sizing, autoplay, start time, loop, Shorts format or playlist mode.
  3. Check the live preview to confirm the video and layout look right.
  4. Copy the generated embed code and paste it into your website’s HTML, a WordPress Custom HTML block, a Shopify section, or a Wix embed widget.

Who this YouTube embed code generator is for

This tool is built for anyone who needs to put a YouTube video on their own website: bloggers embedding a tutorial, businesses adding a product demo to a landing page, developers who want clean, standards-compliant markup without memorising iframe parameters, and course creators who need a video to start at an exact timestamp. No coding knowledge is required to use it, though the output is plain HTML that any developer can read and adjust further.

Key iframe parameters this generator uses

Parameter Set by Effect
Domain (youtube.com vs youtube-nocookie.com) Privacy-enhanced toggle Controls when YouTube can set cookies
start / end Start / end time fields Trims playback to a specific range
autoplay / mute Autoplay / Mute toggles Controls automatic, silent playback
loop / playlist Loop toggle Repeats a single video or playlist
controls Show controls toggle Shows or hides the player control bar

See the full list of YouTube embed parameters explained for every option, including ones not exposed as a toggle above.

Learn more

For the full picture on embedding, read our complete YouTube embed guide, our guide to responsive YouTube embeds, or browse the knowledge base for short definitions of terms like iframe and youtube-nocookie.com.