YouTube Embed Code Generator
Paste a video link, pick your options, and copy ready-to-use embed code for any website or blog.
By Shah Rukh, software developer · Last updated:
How to embed a YouTube video
- Paste the video link above and choose your options.
- Click Copy code.
- Paste the code into your page’s HTML. In WordPress, use a Custom HTML block. In most site builders, use an Embed or HTML element.
What each option does
| Option | What it adds |
|---|---|
| Responsive | Wraps the player so it keeps a 16:9 shape and fills the width on phones and desktops. |
| Privacy-enhanced mode | Uses youtube-nocookie.com, so YouTube doesn’t store viewing information about your visitors until they play the video. |
| Start at | Adds start= so the video begins at a chosen moment. |
| Autoplay | Adds autoplay=1&mute=1. Browsers only allow autoplay when the video starts muted. |
| Loop | Adds loop=1 plus the playlist parameter that YouTube requires for looping a single video. |
| Hide controls | Adds controls=0 for a cleaner look. |
| Captions | Adds cc_load_policy=1 to turn on captions when they’re available. |
Tips for embedding videos
- Only embed videos where the owner has allowed embedding. If they haven’t, the player shows an error.
- Autoplaying videos can annoy visitors and slow down your page. Use autoplay sparingly.
- Add a sentence or two about the video next to it. It helps both readers and search engines.
ToolsCloset is not affiliated with YouTube or Google. These tools only use public information and run in your browser. We don’t download videos or audio, and we never store the links you paste.
Frequently asked questions
How do I make a YouTube embed responsive?
Tick “Responsive”. The code wraps the player in a container with a 16:9 aspect ratio, so it resizes to fit any screen.
Why doesn’t autoplay work?
Browsers block autoplay with sound. The generator adds mute=1 automatically, which lets autoplay work in most browsers.
What is privacy-enhanced mode?
It embeds the video from youtube-nocookie.com, which stops YouTube from storing information about visitors who don’t play the video.
Can I start an embedded video at a specific time?
Yes. Enter a time like 1:30 in “Start at” and the code adds the start parameter in seconds.
How do I loop a YouTube video?
Tick “Loop the video”. YouTube needs both loop=1 and playlist set to the video’s own ID, and the generator adds both.
YouTube guides
YouTube Thumbnail Size Guide
The right size, format and file limit, plus design tips.
What Is YouTube RPM?
How much YouTube pays per 1,000 views, and how to earn more.
Related tools
YouTube Thumbnail Downloader
Grab any video’s thumbnail in HD and four smaller sizes.
YouTube Money Calculator
Estimate channel earnings per day, month and year from views.
YouTube Timestamp Link Generator
Link to an exact moment and check your chapters work.
YouTube Title & Description Counter
Check titles, descriptions and tags against YouTube limits.