Video and options
Paste a YouTube video link. The code updates as you change the options.
How to
Embed a video in three steps
- Paste the video link Any normal watch link, youtu.be link or Shorts link works.
- Choose the options Set a start and stop time if you want a clip, switch on looping, and keep the privacy-enhanced domain unless you need the standard one.
- Copy the code into your page Use the responsive version unless your page builder needs a fixed size. Paste it where the video should appear.
Embedding well
- Use the responsive wrapper so the video keeps its shape on a phone. A fixed iframe can overflow a narrow column.
- Keep the title attribute meaningful. Screen reader users hear it when they reach the video.
- Lazy loading means the page does not fetch the player until it is near the screen, which helps the page load.
- A start time only makes the video begin there. Viewers can still scrub back to the beginning.
FAQ
Embed code questions
How do I make an embedded video start at a certain time?
Add a start time in the options. The code gets a start parameter in whole seconds, so 1:30 becomes start=90. The video begins there when it is played.
Why does looping need the video ID twice?
The player only repeats a single video when it is also given as a playlist with one item. The generated address adds loop=1 and playlist with the same video ID to do this.
What is the privacy-enhanced domain?
It is youtube-nocookie.com. YouTube documents that embeds on this domain do not store information about visitors until they play the video. It does not stop tracking once a visitor presses play.
Why does my embed say the video is unavailable?
The owner may have switched off embedding, or the video may be private, deleted or restricted by age or region. This tool cannot tell, because it never contacts YouTube.
What does the responsive wrapper do?
It is a box with a fixed aspect ratio and a full-width iframe inside it, so the video scales with its container instead of keeping a fixed size in pixels.