NEWMeet the new Video Gallery — YouTube, TikTok, Instagram Reels, Vimeo and Twitch in one widget.

Find a widget for you

You can use our widgets to accomplish practically any task on your website — increase users' confidence, grow conversion, engage your visitors, provide support, etc.

See All Widgets
Video Gallery

Video Embed Code Generator

Get an embed code for a video hosted anywhere: an MP4 file, Google Drive, Dropbox, Loom or Wistia. Paste the link and copy clean, responsive HTML.

  • Free
  • No sign-up
  • Works on any website
  • Updated September 2026

Settings

Video fileLive player preview on the production page
Embed code
<div style="position:relative;width:100%;aspect-ratio:16 / 9;">
  <video style="position:absolute;inset:0;width:100%;height:100%;border:0;" controls playsinline preload="metadata">
    <source src="https://example.com/videos/intro.mp4" type="video/mp4">
    Your browser does not support HTML5 video.
  </video>
</div>

Elfsight Video Gallery

Have more than one video?

Video Gallery shows videos from anywhere — your own hosting, Drive, Dropbox, YouTube or Vimeo — in one gallery, grid or carousel.

  • Auto-updates when you publish new videos
  • Carousel, grid, masonry or player with playlist
  • YouTube, Vimeo, TikTok, Instagram, Twitch and any video link
  • No coding — works on any website
Create Widget for Free Build a video galleryNo credit card needed
YouTube
Behind the Scenes: Studio Tour
TikTok
First Descent of the Season: Heli Drop in the Alps
Twitch
Late Night Ranked Grind
Instagram
Morning Flow: 10-Minute Full Body Stretch
YouTube
Restaurant Plating at Home, Step by Step
Vimeo
Where the Pavement Ends: Full Off-Road Test

How to use the Video Embed Code generator

  1. 1Paste a link

    Use a direct .mp4 or .webm link, or a Google Drive, Dropbox, Loom or Wistia share link.

  2. 2Pick options

    Choose controls, autoplay, loop and an optional poster image.

  3. 3Copy the code

    Paste the HTML into an embed block. The generator uses the right format for each source.

Supported sources and what the code uses

SourceEmbed formatTip
MP4 / WebM fileHTML5 <video> tagMP4 (H.264 + AAC) plays in every modern browser.
Google Drive/file/d/ID/preview iframeSet sharing to “Anyone with the link”.
Dropbox<video> with raw=1raw=1 streams the file instead of downloading it.
Loomloom.com/embed/ID iframeUse the share link from Loom.
Wistiafast.wistia.net/embed/iframe/IDPaste the media page URL.

Source: MDN: The Video Embed element

How to add the code to your website

In the block editor, add a Custom HTML block where the video should appear and paste the code. In the classic editor, switch to the Text tab first.

See Video Gallery for WordPress →

Embed code vs. Elfsight Video Gallery

Embed codeVideo Gallery
Videos per embedOne video (or one playlist)Unlimited videos in one widget
Stays up to dateEdit the code for every new videoNew videos appear automatically
Mix sourcesOne platform per snippetYouTube, Vimeo, TikTok, Instagram, Twitch and any video link
LayoutsSingle playerPlayer with Gallery, Carousel, Grid, Masonry, Playlist
Responsive designNeeds a CSS wrapperBuilt in
CodingCopy and paste code for each videoNo code — edit visually in the editor
PriceFreeFree plan, no credit card needed

Frequently asked questions

How do I embed an MP4 video on a website?

Paste the direct link to the .mp4 file and copy the generated HTML5 video code. Add a poster image so visitors see a thumbnail before playback.

How do I embed a Google Drive video?

Share the file with “Anyone with the link”, paste the link above and copy the iframe. It uses Drive’s /preview player.

Can I embed a Dropbox video?

Yes. The generator changes the link to raw=1 so the video streams in your page instead of downloading.

Why won’t my video autoplay?

Browsers only allow autoplay for muted videos (see the Chrome autoplay policy), so autoplay in this generator always starts muted.

Should I host videos myself?

Self-hosting works for short clips, but large files use a lot of bandwidth. For longer videos, a platform like YouTube or Vimeo is usually faster for viewers.

Official documentation

More free tools

Related guides

From one video to a gallery people watch

Create a free video gallery in minutes and add it to any website.

Create Widget for Free