From a video link to code you can paste into any web page. No sign-up, and your URL isn't sent to our server.
Any youtube.com, youtu.be, Shorts, embed or live link, or just the 11 character video ID.
A ?t= in the link fills StartPick the size, start and end times, and options like autoplay, loop and captions.
The preview updates as you goCopy the code and paste it into your page's HTML, or an HTML block in your CMS.
Saved in Recent embedsThe studio builds the same iframe YouTube's Share and Embed button gives you, with the player options already added.
Copy the URL from your browser or from YouTube's Share button. The studio finds the video ID in any common format.
16:9 suits normal videos. 9:16 suits Shorts, and a Shorts link switches to it for you. Free size lets you type both sides.
Fixed code is always the size you set. Responsive code fills the space it sits in, up to your width, and keeps the shape.
Play the live preview to test the start and end times. Copying saves the settings to Recent embeds in this browser.
Four habits that keep an embedded video fast, private and easy to watch.
youtube-nocookie.com keeps views on your page from shaping what the viewer sees on YouTube, and ads in it aren't personalised.
Browsers allow muted autoplay. With sound, autoplay usually needs the visitor to have clicked on your site first.
YouTube needs a player at least 200 by 200 px, and suggests 16:9 players at least 480 by 270.
The code includes loading="lazy", so the browser waits to load the player until it is near the screen.
Every toggle adds a documented parameter to the embed URL. Here is what YouTube says each one does today.
Whole seconds. Both count from the beginning of the video, so end is not a length.
Plays as soon as the player loads, with no click. YouTube notes that playback data is then collected on page load.
Plays the video again and again. For one video, YouTube needs playlist set to the same video ID.
Shows captions by default, even if the viewer has turned them off on YouTube.
Removes the control bar. Useful for a background video, less so for anything people should pause.
Related videos can't be turned off since 2018. With rel=0 they come from the same channel.
The studio also offers Modest branding (modestbranding=1) for old code, but YouTube says it has had no effect since August 2023. The old showinfo option was retired in 2018, so the studio leaves it out.
The same iframe, set up in very different ways. Your page always decides the details.
A tutorial video next to the written steps. Responsive code keeps it the width of the text on phones.
Start and end times turn one long lecture into short clips, without editing the video.
A short product loop near the top of the page. Muted autoplay plays it without a click.
Privacy-enhanced mode keeps embedded views from shaping visitors' YouTube experience, or the ads they see elsewhere.
These come from YouTube's player docs and Help pages. Break one and the player may not play.
What YouTube's own pages say an embed needs.
Player widths compared with a 1280px wide player. All keep the 16:9 shape.
Each of these stops the video playing on your page.
The code from the studio sets referrerpolicy="strict-origin-when-cross-origin", which sends your site's address (not the full page URL) as the Referer. Don't change it to no-referrer, or YouTube may block playback.
Embed code doesn't change on its own. These habits catch the things that do.
A new upload gets a new video ID. The old embed keeps showing the old video, or an error if it was removed.
Old embeds often carry showinfo=0 or modestbranding=1. Neither does anything now, so they can go.
If you trim a video in YouTube Studio, later moments shift. Update the start and end times to match.
Fixed-size code wider than the screen can overflow. Switch to responsive code if a page scrolls sideways.
YouTube's Share and Embed button gives you the basic code. YouTube Help then has you edit it by hand for most options.
| Feature | CleverTools generator | YouTube Share, Embed | Writing the iframe by hand |
|---|---|---|---|
| Ready-to-paste iframe | ✓ Yes | ✓ Yes | You write it |
| Autoplay, captions, start time | ✓ One click each | Edit the code by hand | If you know the names |
| Privacy-enhanced domain | ✓ On by default | Change the domain by hand | By hand |
| Loop one video | ✓ Adds playlist for you | By hand | ✗ Easy to miss playlist |
| Responsive code | ✓ One click | ✗ No | Extra CSS |
| Marks retired options | ✓ Yes | ✗ No | ✗ No |
| Recent settings kept | ✓ Last 5, this browser | ✗ No | ✗ No |
Need the plain player and nothing else? YouTube's Embed button is quickest. Want start and end times, privacy mode, autoplay or responsive code? Use the studio above.
Small details that decide whether a video helps a page or slows it down.
It is one change of domain in the code, and YouTube offers it for any player on a website.
Muted autoplay is always allowed in Chrome. With sound it often won't start at all.
end=150 stops at 2:30 of the video, whatever the start time. Set both from the video's clock.
A 560px fixed player is wider than many phone screens. Responsive code shrinks to fit.
loop=1 alone won't repeat one video. The studio adds playlist with the same ID for you.
Remove showinfo and modestbranding from old code. YouTube ignores both now.
Captions on by default help anyone watching with the sound off, like visitors who meet a muted autoplay.
For a link instead of a player, use the YouTube Timestamp Link Generator.
Set a start and end time for each part of a long video, copy the code, and repeat. Each embed plays just its part, from the same upload, so you never have to cut and re-upload clips.
Fixed code is exactly the size you set. Responsive code fits the space it is given. Most modern pages want responsive.
Fills the width of its column, up to the width you set, and keeps the shape. No sideways scroll on phones, no extra CSS.
Responsive tab · blogs, landing pages, docs
Always exactly the width and height you type. Good for a sidebar or a layout with a set column width.
Fixed size tab · sidebars and set-width layouts
The same tool, six very different jobs.
A tutorial video beside the written steps, starting at the step the post is about.
Short clips from one long lecture, each with its own start and end time.
A muted, looping product video near the top of a landing page.
A product demo on the product page, in privacy-enhanced mode.
A responsive player that fits the article column on every screen.
Clean, checked iframe code to drop into a template or a CMS block.
Writing the video's description too? Try the YouTube Description Template.
Quick answers about YouTube embed code, player options and privacy-enhanced mode.
Reviews from people who used this tool.
Loading reviews…
Jump to a version of this tool already set up for a specific need.
Free, with no sign-up, just like this one.
Paste a video link, choose the size, start time and player options, and copy clean iframe code for your site. Watch a live preview as you go, in privacy-enhanced mode by default.
Video link · size · start and end · player options · live preview
youtube.com, youtu.be, Shorts, embed, live or music.youtube.com links, or an 11 character video ID. A ?t= in the link fills the start time.
Shape locked at 16:9. Change one side and the other follows.
Always 560 by 315 pixels, whatever the screen size.
Leave blank to play the whole video. Both times count from the start of the video.
<!-- Your iframe code appears here -->
Embeds you copy appear here, saved only in this browser (the last 5).
Tools that pick up where this one leaves off.