YouTube Embed Code Generator
YouTube's Share box gives you a fixed 560 by 315 player with only a couple of options, and a single video only loops in an embed when the playlist parameter repeats its own ID, so the useful settings have to be written into the code by hand.
Player options
Times can be written as 1:30, 1:02:45, 90 or 1m30s. A link that already carries a start time fills the Start at box.
Your embed code
Shows the video's 480×360 thumbnail as a link to the watch page. Nothing from YouTube loads until the reader clicks, which keeps the page light. Not available for whole playlists.
What this tool does
This YouTube embed code generator turns a video, Shorts or playlist link into embed code you can paste into a website, a blog post or a site builder's custom HTML block. Choose a responsive player that fills its column, a vertical one for Shorts or a fixed size, tick the player options you want, and the iframe code, the bare embed URL and a lightweight thumbnail link are rebuilt as you go.
How to embed a YouTube video with custom options
- Paste the link. Watch links, youtu.be links, Shorts, live and embed links work, as do playlist links and bare video or playlist IDs. A Shorts link switches the player to 9:16, and a time already on the link fills the Start at box.
- Set the size. Responsive code wraps the player in a box with a fixed aspect ratio, so it scales on phones. Fixed size writes a plain width and height.
- Pick the options. Autoplay, start muted, loop, hidden controls, captions on by default, related videos from your own channel, inline playback on iPhone and privacy-enhanced mode are each one tick.
- Copy and test. Copy the code, or open the embed URL in a new tab to check it plays the way you expect before it goes on a live page.
The details the Share box leaves out
Several of the pages that rank for this search are front ends for paid widget builders, and older guides still pass options that have stopped working. YouTube's player documentation lists modestbranding and showinfo as deprecated, so this tool does not offer them. It does handle the rules that trip people up: loop on a single video needs the playlist parameter set to that same video, which is added for you; end is counted from the start of the video, not from your start time; and rel=0 no longer hides suggestions, it limits them to your own channel. Autoplay is unreliable with sound on, because browsers often block it, so the tool warns you to start the player muted.
Size matters too. YouTube asks for embedded players of at least 200 by 200 pixels and recommends at least 480 by 270 for a 16:9 player, and the tool warns when a fixed size falls below either. Privacy-enhanced mode swaps the address to youtube-nocookie.com, which Google describes as stopping embedded views from shaping the viewer's YouTube recommendations.
Everything is built by your browser, so nothing you paste is sent anywhere. To link to a moment rather than embed it, use the YouTube timestamp link generator. To know whether embedded plays show up in your numbers, read how YouTube counts views. The thumbnail is the first thing readers see on an embed before they press play, so make one worth clicking with Thumblore.
Frequently asked questions
How do I get the embed code for a YouTube video?
Paste the video's link into this tool and copy the code it builds. On YouTube itself you can also press Share, then Embed, which gives a fixed-size player with only a couple of options.
How do I make a YouTube embed responsive?
Wrap the iframe in a box with a fixed aspect ratio and set the iframe to fill it. Choose Responsive, 16:9 here and the wrapper and iframe styles are written for you, or Responsive, 9:16 for a Short.
Why does my embedded YouTube video not autoplay?
Usually because the browser blocks autoplay with sound. Tick both Autoplay and Start muted so the URL carries autoplay=1 and mute=1, and keep autoplay in the iframe's allow list, which this code does.
How do I loop an embedded YouTube video?
Add loop=1 and set the playlist parameter to the same video ID, because the player only repeats a single video that way. Tick Loop here and both are added to the embed URL.
Is my link uploaded anywhere?
No. The code is built by your own browser from the link and options you choose. Nothing is sent to a server, and nothing from YouTube loads until you press Test or publish the code.
Stop designing thumbnails. Start generating them.
Describe your video, pick your face, and Thumblore returns click-ready 1280×720 thumbnails in seconds — free to start.
Try Thumblore freeMore free tools
Add Shadow to Image
Give a cutout a soft drop shadow, a hard offset shadow or a glow in its own shape, and download it as a transparent PNG.
Open tool →Add Arrow to Image
Draw thick straight or curved arrows and circle callouts on any image, with an outline and shadow, and download it at full size.
Open tool →Subtitle Converter
Convert captions between SRT, WebVTT and SBV, shift timing that drifted after an edit, and check for overlaps before you upload.
Open tool →