Handytool
SocialRuns locally

YouTube embed code generator

Paste a YouTube URL and generate a clean iframe embed — with autoplay, loop, start time, privacy-enhanced mode and responsive wrapper options.

Paste a YouTube URL above to generate the embed code.

About the YouTube embed code generator

Handytool's YouTube embed code generator turns any YouTube URL into a ready-to-paste iframe. Toggle autoplay, loop, mute, controls, start time and the privacy-enhanced (youtube-nocookie.com) host, pick fixed width/height or a responsive 16:9 wrapper, then copy the embed code. A live preview plays the video with your settings so you can verify the embed before shipping it to your site.

YouTube embed code generator features

  • 01

    Every embed option, in one place

    Autoplay, mute, loop, controls, related videos, modest branding and start time — all toggleable. The generator keeps your iframe compliant with YouTube's latest parameters so it renders the same in production as in the preview.

  • 02

    Privacy-enhanced host by default

    Uses youtube-nocookie.com so YouTube doesn't drop tracking cookies until a visitor actually plays the video. Great for GDPR-friendly sites that still want YouTube's player.

  • 03

    Responsive or fixed size

    Switch to the responsive wrapper for a 16:9 iframe that fills its container — perfect for blog posts and landing pages. Or keep the classic fixed width/height for documentation and help pages.

YouTube embed code generator FAQ

How do I embed a YouTube video on my website?
Paste the YouTube URL, pick the options you want (start time, autoplay, responsive), and copy the generated iframe. Paste it into your HTML, CMS or Markdown file where the video should appear.
What does privacy-enhanced mode do?
It swaps youtube.com for youtube-nocookie.com. YouTube delays setting tracking cookies until a visitor clicks play, which helps with cookie-consent and GDPR requirements.
Why does autoplay force mute?
Chrome, Safari and Firefox block autoplay for videos with sound. The generator adds mute=1 whenever autoplay is on so the video actually starts instead of showing a paused player.
Can I start the video at a specific timestamp?
Yes. Enter the start time as seconds (42), minutes:seconds (1:23) or hours:minutes:seconds (1:02:03). The tool appends the right start parameter to the iframe URL.
How do I loop a YouTube embed?
Enable Loop. The generator adds loop=1 and playlist=VIDEO_ID — both parameters are required together because YouTube only loops videos that are part of a playlist.
Is the embed code generated on your servers?
No. The URL is parsed and the iframe is assembled entirely in your browser. Handytool has no record of the videos you embed.

Related tools

Social

Explore other tools

All tools