YouTube Embeds
To embed a YouTube video, click Share under it, then Embed, and paste the HTML code into your site; swap youtube.com for youtube-nocookie.com for privacy-enhanced mode, add ?start= to begin at a second, and creators can stop others embedding by unticking Allow embedding in YouTube Studio.
To embed a YouTube video on a website, open it on a computer, click Share, then Embed, copy the HTML code, and paste it into your page (Embed videos & playlists). For privacy-enhanced mode, change https://www.youtube.com in that code to https://www.youtube-nocookie.com: views in it are not used to personalize the viewer's YouTube or ads. Add ?start=90 to begin at 1:30, and autoplay=1 to start by itself, though autoplayed embeds do not add to the view count. Creators who do not want their videos on other sites can untick Allow embedding in YouTube Studio.
Quick facts
| Get the code | Share > Embed under the video (computer) |
| Video embed address | https://www.youtube.com/embed/VIDEO_ID |
| Playlist embed address | https://www.youtube.com/embed/videoseries?list=PLAYLIST_ID |
| Privacy-enhanced mode | https://www.youtube-nocookie.com/embed/VIDEO_ID |
| Start at a time | ?start=90 (seconds) |
| Stop at a time | end=120 (seconds) |
| Autoplay | autoplay=1; autoplayed embeds do not count views |
| Captions on | cc_load_policy=1, language with cc_lang_pref=fr |
| Turn off embedding | Studio > Content > Details > Show more > untick Allow embedding |
| Missing referrer | "Error 153" |
Sources: Embed videos & playlists, YouTube Help, and YouTube embedded player parameters, Google for Developers, read Nov 6, 2026. The playlist and nocookie addresses were loaded in a test page on Nov 6, 2026.
How do I embed a YouTube video?
- On a computer, open the video or playlist on youtube.com.
- Click Share under the video.
- Click Embed.
- Copy the HTML code from the box (tick Start at first to begin at a moment).
- Paste it into your page's HTML, or into a website builder's embed or HTML block.
Many site builders and blog tools also turn a plain YouTube link into a player when you paste it on its own line. The right-click menu on youtube.com's player has Copy embed code too.
The code is an iframe whose address is https://www.youtube.com/embed/ plus the video ID. Options go after a ? and are joined with &, for example https://www.youtube.com/embed/VIDEO_ID?start=90&cc_load_policy=1.
What is youtube-nocookie.com?
Privacy-enhanced mode is the same player on a different domain, www.youtube-nocookie.com. YouTube Help says a view in it does not personalize the viewer's YouTube experience, inside the embed or later on youtube.com, any ads it shows are non-personalized, and the view is not used to target ads elsewhere. It works on websites only, not in apps. It does not cover what happens if the viewer clicks through to another site (Embed videos & playlists).
To use it, change https://www.youtube.com/embed/ to https://www.youtube-nocookie.com/embed/ in the code; nothing else changes. Network administrators need to allow youtube-nocookie.com through firewalls, as well as youtube.com.
George Vanous, who runs the Freedom! network, recommended it in a Jul 5, 2020 video for every YouTube embed, explaining that YouTube made it for privacy laws such as the EU's GDPR. It does not by itself make a site compliant: sites aimed at children must also self-designate as child-directed, even in privacy-enhanced mode.
Embed options
| Option | What it does |
|---|---|
start=90 |
Starts 90 seconds in |
end=120 |
Stops at 120 seconds from the start of the video |
autoplay=1 |
Starts by itself (muted in most browsers; see Why Videos Autoplay Muted) |
cc_load_policy=1 |
Captions on |
cc_lang_pref=fr |
Caption language, as a two-letter code |
controls=0 |
Hides the player controls |
playlist=VIDEO_ID&loop=1 |
Loops a single video |
rel=0 |
Related videos at the end come from the same channel |
Sources: Embed videos & playlists, YouTube Help, and YouTube embedded player parameters, Google for Developers. Since Sep 25, 2018 related videos cannot be switched off: rel=0 only limits them to the same channel.
How do I stop people embedding my videos?
- Sign in to YouTube Studio.
- Select Content in the left menu.
- Next to the video, select Details.
- At the bottom, select Show more.
- Untick Allow embedding and click Save.
The video then plays only on YouTube itself: other sites' embeds of it stop playing.
Why won't an embedded video play?
- "Error 153": the page did not send an HTTP Referer header, which YouTube's terms require. Opening an embed address straight in the address bar gives it too: embeds are meant to sit inside a page (Embed videos & playlists).
- Age-restricted video: it cannot play on most other sites and sends viewers to YouTube (Age Restriction).
- Embedding turned off by the creator, or the video is private, deleted or blocked in the viewer's country.
- Live stream by channel: the old
embed/live_stream?channel=form showed "This video is unavailable" in a test on Nov 6, 2026; see Share the Live Link.
Embeds, views and ads
An embed that a viewer starts counts as a view; one that autoplays does not (Embed videos & playlists). George Vanous's notes add that YouTube shows ads on embeds only on brand-safe sites, so some embedded plays earn nothing.
Teachers can use YouTube's own education embed, YouTube Player for Education. George Vanous of Freedom! explained it in a Jun 8, 2025 video: it shows no ads, schools and universities pay YouTube to use it, and that fee is shared with the creators whose videos play in it.
What creators say
In an Aug 30, 2020 video, George Vanous showed a YouTube link sitting still in a Twitter feed beside an uploaded video that played as people scrolled, and argued that on Twitter (now X), Facebook and LinkedIn you get more views by uploading the video natively, with the YouTube link in the post, than by embedding it. That is his advice from 2020, when those platforms' video rules were different; it is opinion, not YouTube's guidance.
Jacob LE, in a Jun 12, 2023 video, found the catch in start and end times: turning a shared link into an embed/ address with ?start= and end= made the start time work everywhere, but the end time worked only in a web browser, not in the YouTube app, so he tells people to paste such links into a browser.
Frequently asked questions
How do I get the embed code for a YouTube video? Under the video on a computer, click Share, then Embed, and copy the HTML code. Tick Start at first if the YouTube embed should begin at a certain time.
What is the difference between youtube.com and youtube-nocookie.com embeds? It is the same YouTube player, but in privacy-enhanced mode (youtube-nocookie.com) views do not personalize the viewer's YouTube experience or ads, and any ads shown are non-personalized.
How do I make a YouTube embed start at a certain time? Add ?start= and the number of seconds to the embed address, such as ?start=90 for 1:30. Add end= with seconds to stop it at a point.
Do embedded YouTube videos count as views? Yes, when the viewer plays them. YouTube Help says autoplayed embeds do not add to the view count.
How do I stop other websites embedding my YouTube videos? In YouTube Studio, open Content, then the video's Details, click Show more, untick Allow embedding and save.
Why does my YouTube embed say error 153? The page is not sending an HTTP Referer header, which YouTube requires, or the embed address was opened directly in the browser. Place the embed in a web page that sends a referrer.
Sources
- Embed videos & playlists, YouTube Help, read Nov 6, 2026
- YouTube embedded player parameters, Google for Developers, read Nov 6, 2026
- youtube-nocookie.com - New official privacy-enhanced YouTube embed code!, Freedom!, Jul 5, 2020 (video)
- Get more views by NOT embedding your videos off-YouTube!, Freedom!, Aug 30, 2020 (video)
- How to Share a YouTube Video That Starts and Ends at Specific Times, Jacob LE, Jun 12, 2023 (video)
- YouTube Player for Education ❤️ New revenue stream for you!, Freedom!, Jun 8, 2025 (video)
- Embeds of youtube.com/embed/videoseries, youtube-nocookie.com and embed/live_stream?channel= loaded in a test page, Nov 6, 2026
Moments
How to Share a YouTube Video That Starts & Ends at a Specific Time
Jacob LE
YouTube Player for Education ❤️ New revenue stream for you!
Freedom!
Get more views by NOT embedding your videos off-YouTube!
Freedom!
See also
- Why Videos Autoplay MutedYouTube videos start muted when they play by themselves in the Home feed or search results (the inline player), and browsers such as Chrome block sound on autoplay until you have interacted with the site or have played sound there before.
-
Age RestrictionAn age-restricted YouTube video can only be watched by viewers who are signed in and 18 or older, mostly not on other websites, and it may earn limited or no ads. Creators can restrict their own videos or appeal YouTube's restriction in YouTube Studio.
-
Share the Live LinkShare youtube.com/@yourhandle/live instead of one stream's watch link: while the channel is live, YouTube opens the current stream, and when it is not, the channel page.
-
YouTube Player for EducationYouTube Player for Education is an ad-free YouTube player built into classroom and learning apps, which schools' education partners pay YouTube to license. Since June 2025 creators earn a share of those fees by watch time, opting in at YouTube Studio > Earn > Player for Education.
-
Channel PermissionsYouTube channel permissions let an owner give other Google Accounts the Manager, Editor, Editor (limited), Subtitle editor, Viewer or Viewer (limited) role in YouTube Studio under Settings > Permissions, without sharing a password. Transferring a channel to a new primary owner needs a Brand Account and a 7-day wait.
- Creator AwardsYouTube Creator Awards are the Play Buttons YouTube sends channels that pass a review at 100,000 subscribers (Silver), 1 million (Gold), 10 million (Diamond) and 100 million (Red Diamond). Subscribers alone are not enough: the channel must be active, original and free of recent strikes.