Responsive Video Embed Generator
Paste a video link and get embed code that scales to any screen, loads nothing until play if you like, and keeps the page fast and private.
Funziona nel tuo browser. I tuoi file non lasciano mai il dispositivo. Scopri come verificarlo
…
Come si usa
- 1Paste the link
Paste a YouTube, Vimeo or video file address, or an existing iframe snippet; the tool shows what it recognised.
- 2Set the shape
Pick the aspect ratio, maximum width, alignment and corner radius.
- 3Choose loading
Select the click-to-load poster, a lazy iframe or a normal iframe, and switch privacy mode on.
- 4Set player options
Set start and end, controls, autoplay, muting, looping, captions and inline playback.
- 5Preview
Press Show live preview and check the box at full, tablet and phone widths.
- 6Copy the code
Copy the HTML, CSS and script, or download the test page and the structured data.
Informazioni su questo strumento
The embed code that YouTube and Vimeo give you is a fixed-size iframe, 560 by 315 pixels, that overflows on phones and starts downloading close to a megabyte of player scripts the moment the page opens, even for visitors who never press play. This generator writes better embed code from the same link. Paste a YouTube watch, share, Shorts, live or embed address, a Vimeo link including unlisted ones with their private hash, an old iframe snippet, or the address of your own MP4, WebM or MOV file. The video box keeps its shape at every width with the CSS aspect-ratio property, or with the classic padding-top trick for very old browsers, using 16:9, 4:3, 1:1, vertical 9:16 for Shorts and Reels, 21:9 or any custom ratio, with an optional maximum width, alignment and rounded corners. For loading you can choose a normal iframe, a lazy iframe that waits until it is near the screen, or a click-to-load facade: a poster image with a play button that is a real link to the video page, swapped for the player only when the visitor clicks. Privacy mode switches YouTube to youtube-nocookie.com and adds dnt=1 for Vimeo. Player options include start and end times, autoplay (always muted, because browsers block sound), muted start, loop, controls, captions on by default, related videos limited to your channel, and inline playback on iPhone. For your own files you also get poster, preload, a captions track and an alternative source. Every option shows up instantly in the HTML, CSS and script tabs, a complete test page, the player address, and VideoObject structured data for search engines.
Which loading mode to choose
The facade is the fastest and most private choice for pages with one or more videos below the first screen: the page loads only a poster image, and the player arrives after a click. A lazy iframe is simpler and needs no script, but it still loads the player for everyone who scrolls near it. Use a normal iframe only for a video that is the main content at the top of the page.
Posters
YouTube publishes thumbnails at a fixed address, so the facade can use one automatically, although that image is still fetched from YouTube's image server. For zero third-party requests before the click, upload your own poster. Vimeo has no public thumbnail address, so add your own image for Vimeo videos.
Autoplay and sound
Chrome, Safari and Firefox only autoplay video that starts muted. The generator therefore adds the mute parameter whenever autoplay is on, and a clicked facade starts playing with sound because the click counts as permission.
Limits
The tool does not download, convert or host videos, and it cannot embed videos whose owners have disabled embedding, private videos, or age-restricted YouTube videos. Player parameters are interpreted by YouTube and Vimeo, which change their players from time to time, so an option can behave differently than described.
Esempio svolto
The link https://youtu.be/aqz-KE-bpKQ?t=42 with the facade mode, privacy on, 16:9 and a 12 pixel radius produces a 6-line HTML snippet, 7 CSS rules and a 9-line script. Before a click the page loads one 480 by 360 thumbnail of about 30 KB instead of the player, which typically weighs several hundred KB of scripts. The player address is www.youtube-nocookie.com/embed/aqz-KE-bpKQ with start=42, autoplay=1, rel=0 and playsinline=1. At 375 pixels wide the box is 375 by 211 pixels.
In breve
- Categoria: Sviluppo e dati
- Funziona nel browser, senza registrazione né caricamento.
- Le informazioni che inserisci restano sul tuo dispositivo.
- Disponibile in inglese.
- Contenuto rivisto l'ultima volta il:
- Fonte ufficiale: YouTube IFrame Player API, player parameters
Domande frequenti
Why not just copy the embed code from YouTube?
The standard code has a fixed width and height, loads the full player immediately and sets cookies. The generated code scales to its container, can wait for a click before loading anything, and uses the privacy-enhanced domain.
Does the click-to-load poster work without JavaScript?
Yes. The poster is a normal link to the video page, so without the script a click opens the video on YouTube or Vimeo. With the script, the link is replaced by the embedded player on the spot.
How do I embed a YouTube Short or a vertical video?
Paste the Shorts link and choose the 9:16 ratio. Add a maximum width such as 360 pixels so the video does not fill the whole height of a desktop screen.
Can the video start and stop at certain times?
Yes. Set the start and end in seconds. YouTube honours both; Vimeo supports a start time through the #t= fragment but has no end time parameter. For your own files, the media fragment #t=start,end is used.
Will search engines see my video?
Add the generated VideoObject JSON-LD with a real description and upload date. Search engines can then show the video in video results, as long as the page itself is about the video and the poster is crawlable.
Does the tool contact YouTube or Vimeo while I work?
No. Links are parsed in your browser. The live preview only loads the poster and player after you press Show live preview.
