Turn any YouTube link into ready-to-paste embed code, with size and player options and a live preview. No signup.
Paste a video link, customize the player, and copy a ready-to-use embed code — with a live preview as you go.
Generates a standard YouTube iframe embed — the officially supported way to show YouTube videos on another site. Autoplay only works in most browsers when the video is also muted, so muting is applied automatically when autoplay is on. The preview never autoplays.
The YouTube Video Embed Code Generator is a free tool that turns any YouTube link into a ready-to-paste embed code. Paste a video link, adjust the sizing, playback and privacy options, and copy the finished code with a live preview showing exactly how it will look.
It’s free with no sign-up, and everything is generated in your browser.
| Option | What it does |
|---|---|
| Responsive | The player scales to fit its container, so it looks right on any screen size |
| Fixed size | You set an exact width and height in pixels |
| Aspect ratio | Choose 16:9 for standard video, 4:3 for classic video, 1:1 for square, or 9:16 for Shorts and vertical video |
Use Responsive for most website embeds, since it adapts automatically to mobile and desktop. Use Fixed size when you need the player to match an exact space in your layout.
| Option | What it does |
|---|---|
| Start time | Sets where playback begins, in mm:ss |
| End time | Sets where playback stops, in mm:ss |
| Autoplay | Starts the video automatically when the page loads |
| Mute | Starts the video muted |
| Loop video | Replays the video automatically when it ends |
| Show controls | Displays the play bar, volume and settings |
| Allow fullscreen | Lets viewers expand the player to fullscreen |
| Disable keyboard shortcuts | Turns off keyboard control of the player |
| Show related from any channel | Controls whether related videos can come from other channels when the video ends |
| Show captions by default | Turns captions on automatically, if available |
Most browsers block autoplay with sound to stop pages from playing audio without permission. The tool automatically applies mute whenever autoplay is turned on, so your embed will actually autoplay instead of being blocked.
| Option | What it does |
|---|---|
| Privacy-enhanced mode | Uses youtube-nocookie.com, so YouTube doesn’t set cookies on a visitor’s browser until they press play |
| Progress bar color | Choose red (YouTube’s default) or white |
| Player language | Sets the language used for player controls and interface text |
Privacy-enhanced mode is worth turning on if your site has a cookie policy or you want to reduce tracking before a visitor chooses to watch.
The tool outputs a standard YouTube iframe embed, which is the officially supported way to place a YouTube video on another website.
It isn’t a video download or a copy of the file. It’s a small piece of HTML that loads the player directly from YouTube, so the video continues to count views and follow YouTube’s terms on the creator’s channel.
Yes. It’s completely free, with no registration required.
A standard YouTube iframe embed, which is YouTube’s officially supported method for showing videos on other websites.
Most browsers block videos from autoplaying with sound. Muting the video is what allows autoplay to actually work.
It’s an embed mode that uses youtube-nocookie.com instead of youtube.com, so YouTube doesn’t set cookies on a visitor’s browser until they press play.
Yes. Set a start time and, if needed, an end time in mm:ss to control which section plays.
No. An embedded video still plays through YouTube’s player and counts toward the video’s views and ads on the original channel.
Yes. Paste the Shorts link and choose the 9:16 aspect ratio for a vertical player.
Responsive scales the player to fit its container automatically. Fixed size locks the player to an exact width and height that you set.
Anywhere your site accepts HTML, such as a Custom HTML block in WordPress or an HTML widget in Elementor.
No, as long as the video’s owner allows embedding, which is the default setting for most public YouTube videos. If embedding is disabled by the creator, the video won’t play through this method.
Paste a video link, adjust the settings, and copy the embed code for your site.
↑ Back to the Tool