Video, youtu.be, Shorts, live and playlist links work. A UC channel ID embeds that channel's uploads.
How to use
Paste a link
Enter a watch, youtu.be, Shorts, live or playlist link, a video ID, or a UC channel ID. A t= time in the link fills Start at, and Shorts links switch the player to 9:16.
Set size, times and options
Choose Aspect ratio, Max width and Sizing, type Start at and End at as 1:30 or seconds, then tick the Player options you want. The preview reloads with each change.
Copy the format you need
Pick HTML, Click to load, WordPress, React / JSX, Markdown or Player URL, then press Copy. Download .html saves a test page with the player on it.
Why YouTube Embed Code Generator
- Embeds videos, Shorts, playlists and a channel's uploads, with a live preview.
- Start and end time, autoplay, mute, loop, captions, player language and more.
- Responsive, click-to-load, WordPress, React and Markdown output, plus privacy-enhanced mode.
YouTube embed parameters reference
Every option is a query parameter on the player's src URL. The tool sets these for you and shows the finished URL on the Player URL tab, so you can check exactly what was added.
| Parameter | What it does | In this tool |
|---|---|---|
| autoplay=1 | Starts playing on load (muted only, in most browsers) | Autoplay |
| mute=1 | Starts with the sound off | Start muted |
| start=90, end=120 | Plays from 1:30 and stops at 2:00 | Start at, End at |
| loop=1 and playlist=ID | Replays the video when it ends | Loop sets both |
| controls=0 | Hides the player controls | Show player controls |
| rel=0 | Related videos at the end come from the same channel | Related videos checkbox |
| cc_load_policy=1, cc_lang_pref=en | Shows captions, in a chosen language | Captions on, Captions language |
| hl=fr | Sets the player's menu language | Player language |
| playsinline=1 | Plays inline on iPhone instead of going fullscreen | Play inline on iPhone |
| disablekb=1, fs=0 | Turns off keyboard shortcuts or the fullscreen button | Two checkboxes |
| iv_load_policy=3, color=white | Hides annotations, makes the progress bar white | Two checkboxes |
| enablejsapi=1 | Lets your own script control the player | Enable JavaScript API |
Embedding in WordPress, Blogger, React and plain HTML
The same player works anywhere that accepts raw HTML. What changes is where you paste it and which output tab you copy.
- WordPress block editor: copy the WordPress tab and paste it in the code editor, or paste the HTML tab into a Custom HTML block.
- Blogger: switch the post editor to HTML view and paste the HTML or Click to load tab.
- Plain HTML: paste the iframe where the player should appear. The click-to-load version needs its script too.
- React and Next.js: the React / JSX tab uses allowFullScreen, referrerPolicy and a style object, so it compiles as is.
- READMEs and docs: Markdown cannot hold an iframe, so the Markdown tab gives a clickable thumbnail instead.
- If the video looks tiny or stretched, check Sizing is responsive and that no theme CSS sets a fixed iframe height.
Keeping pages fast with several videos
Each YouTube iframe pulls in the player's scripts, styles and fonts, even if nobody presses play. One video rarely matters, but a tutorial page with five embeds can feel slow on a phone.
Two options in this tool help. Lazy-load, on by default, adds loading="lazy" so browsers wait until the player scrolls near the screen. Click to load goes further: it shows the thumbnail and a play button, and only builds the real player after a click, at which point it starts playing straight away.