Real people answer 24/7We never ask for your password

Need something not listed?Ask for a custom price →

YouTube embed code generator: responsive and fast-loading

Paste a video, Short or playlist link. Pick your options and copy code that works on WordPress, Wix, Shopify and any HTML page.

Free, alwaysNo sign-upPrivate
Example filled in. Paste your own link.
This link is in a playlist
Loading
Size
Corners
Player
PREVIEW
    Your embed code

    Want more people to see this video on YouTube too?YouTube views →

    A YouTube embed code generator turns a video link into a small piece of HTML that shows the video on your own website. This one makes code that resizes to fit any screen, plays only the part you choose, works for Shorts and playlists, and can load as a light image until a visitor presses play, so your page stays fast.

    How to embed a YouTube video on your website

    1. Copy the video link. Open the video on YouTube and copy the address from the browser, or use Share > Copy link. Links to Shorts, live streams and playlists work too.
    2. Paste it into the generator above. The preview shows the video straight away.
    3. Pick your options: fast-loading or standard player, size, corners, start and end time, autoplay, loop and captions.
    4. Copy the code and paste it where the video should appear. The buttons under the code show where to paste it in WordPress, Elementor, Wix, Shopify, Squarespace and Webflow.

    On WordPress you can also paste the plain YouTube link into a paragraph and WordPress turns it into a player. That’s fine for a quick post, but you can’t control the size, the start time or how heavy the player is. Embed code gives you all three.

    Fast-loading or standard player: which to choose

    A normal YouTube embed loads the full player, with its scripts, as soon as the page opens, even if nobody watches. Google’s page speed guidance suggests a facade for embeds like this: a light placeholder that looks like the player and loads the real one only when the visitor clicks. Its example compares a 3 KB YouTube facade with a 540 KB player, in the Lighthouse guide to third-party facades.

    • Fast-loading shows the video’s thumbnail and a play button. One click loads the player and starts the video. Pick this for most pages, especially landing pages and pages with more than one video.
    • Standard player loads YouTube’s player right away. Pick it when the video must start by itself (autoplay) or when the video is the only thing on the page.

    Fast-loading code works without any plugin or extra script file: everything it needs is inside the code you copy.

    YouTube embed options explained

    Responsive, vertical or fixed size

    YouTube’s own embed code is a fixed 560 × 315 box, which can spill off a phone screen. Responsive 16:9 fills the width of whatever it sits in and keeps the right shape. Vertical 9:16 is for Shorts and vertical videos; it stays centred and no wider than 360 px, so it doesn’t fill a whole desktop screen. Fixed size is there when a layout needs exact pixels.

    Start and end time

    Type the time as minutes and seconds (1:30) or seconds (90). If your link already has a time in it, like ?t=90, the generator uses it as the start. The end time is counted from the beginning of the video, not from the start time.

    Autoplay and loop

    Browsers only let a video start by itself when it is muted, so autoplay code always starts muted. To loop a single video, YouTube needs the video listed as its own playlist; the generator adds that for you.

    Controls, captions and related videos

    You can hide the control bar or turn captions on by default. Since 2018 YouTube no longer lets you switch off related videos at the end; the “related videos” option now limits them to videos from the same channel. Two old settings, showinfo and modestbranding, no longer do anything, according to YouTube’s player parameters reference, so the generator leaves them out.

    Privacy-enhanced mode

    This uses YouTube’s youtube-nocookie.com address. Videos watched this way don’t shape the viewer’s YouTube recommendations or the ads they see elsewhere. It’s on by default here because it costs you nothing and reassures visitors who care about tracking.

    Title for screen readers

    Every video frame should have a short title, so people using screen readers know what it is. Type something that describes the video, like “How our review service works”.

    Where an embedded video helps most

    • Service and product pages: a one-minute walkthrough answers questions a visitor would otherwise leave to ask. Put it near the price or the order button, not at the very bottom.
    • Customer stories: a short clip of a real customer is more convincing than a paragraph of praise. Start it at the strongest moment with the start time option.
    • How-to articles: embed the exact part of a tutorial that matches the step, with a start and an end time, instead of making readers scrub through.
    • Landing pages: use fast-loading, so the video doesn’t slow the first impression or your page speed score.

    How to embed a playlist or a Short

    Paste a playlist link and the code plays the whole list in order. If you paste a link to a video that is part of a playlist, the generator asks whether you want just that video or the whole playlist. Playlists use the standard player, because the fast-loading version needs a single video’s thumbnail.

    Paste a Shorts link and the size switches to vertical 9:16 automatically. Shorts play in the normal player once embedded, with the usual controls.

    YouTube embed not working? Common fixes

    “Error 153: Video player configuration error”

    YouTube now refuses to play embeds that don’t tell it which website they are on. If your site sends no referrer, viewers see Error 153 and only a “Watch on YouTube” link. Code from this generator includes referrerpolicy="strict-origin-when-cross-origin", which is what YouTube recommends. If you still see the error, your site or a security plugin may be sending Referrer-Policy: no-referrer or same-origin for the whole page; change it to strict-origin-when-cross-origin.

    “Video unavailable” or “Playback on other websites has been disabled”

    The creator has turned off embedding for that video, or the video is age-restricted. Both can only be watched on YouTube. If it’s your own video, open it in YouTube Studio and tick “Allow embedding”.

    Autoplay doesn’t start

    Check that you chose “Standard player”: fast-loading waits for a click by design. Muted autoplay is the only kind browsers allow, and some browsers or battery-saving modes block even that.

    The video looks cut off on phones

    You are probably using fixed-size code or code copied straight from YouTube. Switch to “Responsive 16:9” and paste the new code.

    Do embedded views count on YouTube?

    They can, when a viewer presses play. YouTube’s help page on embedding says autoplayed embeds don’t count as views, so autoplay won’t grow your view count. Embedding helps a video in other ways: people find it on your site, watch it there, and some follow the link to your channel. If you want a new video to look popular when people first find it, see our YouTube growth services.

    Is the code safe to use on any website?

    Yes. The code is plain HTML: a frame from YouTube, or a thumbnail and play button that load that frame. Nothing is loaded from our site, and the video keeps working if this page ever changes. The small “Created with TheSMMExpert” line under the video is optional; untick it before you copy if you don’t want it.

    Why use this generator instead of YouTube's own Embed button or ChatGPT?

    YouTube's Share > Embed gives you a fixed 560 by 315 box that doesn't resize on phones, with no end time, no fast-loading option and no vertical size for Shorts. This generator makes code that fits any screen, sets a start and an end, and can show a light image until someone presses play.

    A chatbot can write embed code, but it often adds parameters YouTube has retired, such as showinfo or modestbranding, or leaves out the referrer setting that prevents Error 153. Here you see a working preview before you copy.

    Frequently asked questions

    Why not just copy the embed code from YouTube?

    You can. YouTube's code is a fixed size, so it can overflow on phones. This generator adds responsive sizing, start and end times, a fast-loading option and a vertical size for Shorts, and shows a preview first.

    Is this YouTube embed code generator free?

    Yes. No sign-up and no limits. The code is made in your browser, and the small "Created with TheSMMExpert" credit is optional: switch it off before you copy.

    How do I embed only part of a YouTube video?

    Type a start and an end time. The player starts at the start time and stops at the end time. Both are counted from the beginning of the video.

    Can I embed a YouTube video without the player controls?

    Yes. Switch off "Show player controls". Viewers can still click the video to play or pause it, so keep controls on if people need to skip ahead.

    Why can't some YouTube videos be embedded?

    The creator may have turned off embedding, or the video is age-restricted. Both send viewers to YouTube instead. A missing referrer causes "Error 153"; this generator adds the setting that prevents it.

    Do views from an embedded video count on YouTube?

    YouTube says autoplayed embeds don't count as views. A viewer who presses play on your page is a normal view, as long as it meets YouTube's usual checks.

    Is my link saved?

    No. The tool runs in your browser. Nothing you paste is sent to us or stored.

    Chat with our team on TelegramChat with our team on WhatsApp