YouTube Embed Code Generator
Generate a customizable iframe embed code for any YouTube video.
The YouTube Embed Code Generator creates a ready-to-paste iframe for embedding a video on your website or blog. Choose the size, turn autoplay or loop on, hide the controls or set a start time — then copy the finished code.
Why use this tool
Full customization
Control width, height, autoplay, loop, controls and start time.
Standards-compliant code
Outputs a modern iframe with the correct allow and referrerpolicy attributes.
Copy and paste
Drop the generated code straight into any HTML page or CMS.
How to use it
Paste the video URL
Add the YouTube video you want to embed.
Choose your options
Set size, autoplay, loop, controls and an optional start time.
Copy the embed code
Paste the iframe into your website's HTML.
Frequently asked questions
Why is autoplay muted?+
Browsers block autoplay with sound. The tool adds mute=1 with autoplay so the video can start automatically.
How do I make the video loop?+
Tick the Loop option — it adds loop=1 and the required playlist parameter for single-video looping.
Can I hide the player controls?+
Yes. Enable Hide controls to add controls=0 to the embed.
Does embedding affect a video's view count?+
Legitimate watch time on embeds counts normally, the same as watching on YouTube.