Video Embed Generator
A video embed generator turns a page URL into the iframe your site needs. Paste youtube.com/watch?v=dQw4w9WgXcQ and it detects YouTube, pulls the ID and builds https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ?rel=0&modestbranding=1 inside a responsive wrapper with lazy loading. Vimeo, Dailymotion, Twitch, TikTok, Rumble and direct MP4 files are recognised the same way.
Check the HTTP(S) URL and the available options. Invalid values clear the output.
This link needs provider-specific embed information that this generator cannot resolve. Use the providerโs permitted embed flow.
Twitch live channels and VODs use different identifiers; clips need their separate provider embed flow here. Replace YOUR_EMBEDDING_HOST with the destination hostname and supply a parent for each embedding domain as required by Twitch. Embedding domains require SSL. The preview uses this host; no localhost exception or playback success is promised.
An h value already supplied in a player.vimeo.com/video/ID embed URL is retained before other options. Other share-link forms remain unresolved. A supplied hash does not remove account, domain or content restrictions.
Embed Options
Preview
Embed Code
Copied
Copy failed. Select the result and copy it manually.
About Video Embed Generator
Paste a normal watch URL and the tool works out which service it belongs to and extracts the video identifier, when the link is supported. This link needs provider-specific embed information that this generator cannot resolve. Use the providerโs permitted embed flow. Both youtube.com/watch and youtu.be links resolve to the same ID. Vimeo, Dailymotion, Twitch, Facebook, TikTok and Rumble each have their own player address, and a link ending in a video file such as .mp4 is treated as a direct video, producing a native HTML video element with a matching source type instead of an iframe.
YouTube embeds are built on youtube-nocookie.com rather than youtube.com, with rel=0 and modestbranding=1 always appended. The checkboxes add parameters on top: autoplay, mute, loop - which also sets the playlist parameter to the same ID, because a single YouTube video will not loop without it - and turning controls off adds controls=0. Everything else stays out of the URL, so the code is short and readable.
Responsive is on by default and wraps the player in a div with padding-bottom of 56.25 per cent, the standard 16:9 trick that keeps the video the right shape at any width. Turn it off and you get a fixed 640 by 360 iframe instead, with the width and height fields taking over. Lazy loading adds loading="lazy" so the player is only fetched when it scrolls into view, and the border radius slider is written straight into the inline style.
Three output formats sit under the preview. HTML is the full snippet for any template or page builder and ends with a small credit line linking back to this tool - delete that paragraph if you do not want it. WordPress gives a width of 100 per cent with a fixed height, ready for a Custom HTML block. BBCode produces a plain link for forums that do not allow iframes at all. The tool builds markup only: it does not host, convert or download anything, and it cannot make a private or region-blocked video playable.
Use Cases
How to use
Paste the video page URL into the input box; the platform is detected as you type and its icon appears beside the field.
Set the size: leave Responsive on for a 16:9 wrapper that fits any column, or turn it off and type a width and height.
Tick the options you need - autoplay, mute, loop, controls, lazy loading - and drag the border radius slider.
Check the preview with content you are allowed to embed. Loading it contacts the provider; availability and playback depend on that provider and your site.
Choose HTML, WordPress or BBCode in the code panel, press Copy, and paste the block into your page.
Choose the output format and copy the current code or link. Check your destination siteโs format support and embedding permissions before using it.
Pro Tips
- Autoplay only works with mute. Every current browser blocks sound-on autoplay, so tick both boxes or the player will simply sit there paused.
- The Twitch embed carries a parent parameter set to the hostname of the page where the code was generated - www.freewebtools.com. Change it to your own domain before publishing or the player will refuse to load.
- Looping a single YouTube video needs the playlist parameter set to the same video ID. The Loop checkbox does that for you, which is why the ID appears twice in the generated URL.
- Leave responsive on unless you are placing the player in a fixed-width box. The wrapper uses a padding-bottom of 56.25 per cent, so a 16:9 video keeps its shape from a phone to a desktop.
- The HTML output ends with a small credit paragraph linking back to this tool. It is a normal paragraph in the code you copy - delete it if you prefer, nothing else depends on it.
Troubleshooting
Nothing happens after pasting the link.
The text was not recognised as a video URL, so no code is produced at all. Paste the full address from the browser bar, including https://, rather than a shortened share text or a search result. A plain phrase with no domain in it is rejected on purpose.
The Twitch player shows an error about an invalid parent.
The parent parameter in the copied code is set to www.freewebtools.com, the hostname where the code was generated. Twitch requires it to match the site actually showing the player. Replace it with your own domain, and add a second parent parameter for any other hostname such as localhost or a staging site.
The video plays but does not autoplay.
Browsers only allow autoplay when the video is muted. Tick Mute alongside Autoplay and regenerate the code. Even then some browsers suppress autoplay on metered connections or in battery-saver mode, so treat it as a nice-to-have rather than something your page depends on.
The player is squashed or leaves a black band.
The responsive wrapper is fixed at 56.25 per cent padding, which is 16:9. A video shot in another aspect ratio - a vertical clip, for instance - will be letterboxed inside it. Turn Responsive off and enter matching width and height values, or change the 56.25% in the copied code to height divided by width times 100.
The embed works here but is blank on my site.
Three usual causes: a content security policy on your site that does not allow frames from the player domain, a consent or cookie banner that blocks third-party iframes until acceptance, or a platform restriction on the video itself. Check the browser console on your own page - a blocked frame is always reported there.
Frequently Asked Questions
It is the snippet of HTML that puts someone else's player inside your page - almost always an iframe pointing at the platform's player address, with the video ID in the URL. You cannot use the normal watch link for that. This tool converts one into the other: paste the watch URL and it returns the iframe, wrapped and configured.
Paste the watch URL - youtube.com/watch?v=... or a youtu.be short link - and copy the HTML output. The generated source is https://www.youtube-nocookie.com/embed/<id>?rel=0&modestbranding=1 inside a responsive wrapper. Paste that block into your template, a Custom HTML block or a page-builder HTML widget, not into a plain text editor that escapes tags.
YouTube, Vimeo, Dailymotion, Twitch, Facebook, TikTok and Rumble, plus direct video files. A link ending in a media file such as .mp4 becomes a native HTML video element with a matching source type instead of an iframe. Anything it cannot classify is left as a generic URL, and text that is not a link at all is rejected without producing any code.
Privacy mode selects youtube-nocookie.com. Loading the preview still contacts YouTube; this does not promise an absence of tracking or cookies.
Leave the Responsive switch on. The code wraps the iframe in a div with position:relative and padding-bottom:56.25%, and stretches the iframe to fill it. That percentage is 9 divided by 16, so the box keeps a 16:9 shape at any width. Switching it off gives a fixed iframe using the width and height fields instead, 640 by 360 by default.
Because browsers block autoplay with sound. Muting may allow autoplay, but browser and provider policy still decide whether playback starts. The generated URL then carries autoplay=1 and mute=1 for YouTube, or autoplay=1 and muted=1 for Vimeo. Some browsers additionally block autoplay in low-power modes, so never rely on it for anything essential.
Twitch live channels and VODs use different identifiers; clips need their separate provider embed flow here. Replace YOUR_EMBEDDING_HOST with the destination hostname and supply a parent for each embedding domain as required by Twitch. Embedding domains require SSL. The preview uses this host; no localhost exception or playback success is promised.
It defers the request. With loading="lazy" the browser does not fetch the player until it is near the viewport, so a video far down a long page costs nothing on first load. The attribute is on by default here. Turn it off only if the video is the first thing visitors see, where the delay would be visible instead of helpful.
The generator will happily build the code, but the platform decides whether the player runs. Private videos will not play for anyone but the owner, unlisted ones usually will, and geographic or age restrictions still apply inside the iframe. Preview availability does not establish availability on your destination site. Network errors, browser policy and provider restrictions can also prevent loading.
The player is the same; the packaging differs. HTML is the full snippet with the responsive wrapper and a small credit paragraph. WordPress is a single iframe at 100 per cent width with a fixed height, sized for a Custom HTML block. BBCode is not an embed at all - forums that block iframes get a plain link to the player instead.
Select dimensions, responsive mode, autoplay, mute, loop, radius and lazy loading for the detected source. MP4/WebM/OGG links use video/source markup; other sites use frames. Options depend on the provider. Rumble page slugs stay unresolved. An owner-supplied Vimeo embed h is retained; unknown share-link forms are not converted. The code is assembled in your browser. A preview loads the destination or provider and makes external requests. Private content, login requirements and embedding restrictions still apply; this tool does not bypass them. Shortcodes need compatible site support. BBCode and Markdown may be links rather than players. Copying code grants no content rights or permission to embed.
Select dimensions, responsive mode, autoplay, mute, loop, radius and lazy loading for the detected source. MP4/WebM/OGG links use video/source markup; other sites use frames. Options depend on the provider. Rumble page slugs stay unresolved. An owner-supplied Vimeo embed h is retained; unknown share-link forms are not converted.
The code is assembled in your browser. A preview loads the destination or provider and makes external requests. Private content, login requirements and embedding restrictions still apply; this tool does not bypass them.
Shortcodes need compatible site support. BBCode and Markdown may be links rather than players. Copying code grants no content rights or permission to embed.