Free Embed Code Generator
Turn a YouTube, Vimeo or other https link into clean iframe code. Pick a size, copy the snippet and paste it into your site.
Generate Your Embed Code
Paste a YouTube, Vimeo or other https link.
Screen readers announce this title for the frame.
Paste a link above and your embed code shows up here.
Live preview
The preview appears once the link is valid.
Tip: some sites block framing with X-Frame-Options or a Content Security Policy. If the preview stays blank, the site may not allow embeds. Browsers don't report this to a page, so this tool can't check it for you.
Iframes show content. Widgets capture leads. Describe a form, calculator or popup in plain English and add it to any site with one script.
What Is Embed Code?
Embed code is a short piece of HTML that shows content from one page inside another. Most embed code uses an iframe, which is a frame that loads a separate web page.
You paste the snippet into your site, and the content appears where you put it. The frame keeps that content apart from your page, so its styles and scripts don't clash with yours. Video players and maps often work this way.
How to Use This Generator
Paste your link
Add a YouTube, Vimeo or other https link. The tool detects the type for you.
Choose your options
Pick a responsive or fixed size, check the title and switch on the options you want.
Copy and paste
Check the live preview, press Copy code and paste the snippet into your page.
Where to Paste Embed Code
Every site builder has a spot for custom HTML. Pick your platform for the short version.
Open the page or post in the block editor. Add a Custom HTML block and paste your code. Preview the page, then update it.
Open the page in your Shopify admin. Switch the content box to HTML view with the Show HTML button. Paste your code and save. A Custom Liquid section in the theme editor works too.
Add an Embed HTML element from the Add panel. Choose Code, paste your code and apply it. Then drag the element to size it on the page.
Add a Code block to your page and paste your code. Turn off Display Source so the embed renders instead of showing as text.
Drag an Embed element from the Add panel onto your page. Paste your code in the editor, save it and publish your site.
Paste the snippet into your HTML file, inside the body, where you want the embed to appear. Save the file and reload the page.
Widgets from Embeddable install on these platforms too. See Embeddable widgets or the video player widget if you want more control than a plain frame.
Responsive vs Fixed Embeds
Responsive
The embed fills the width of its container and keeps its shape. The code uses a wrapper div with the CSS aspect-ratio property, so it needs no external CSS. Pick this for most pages and for mobile.
Fixed
The embed keeps the width and height you set in pixels. Pick this when the space on your page never changes, such as a sidebar slot. The code adds max-width of 100%, so the frame can still shrink on small screens.
Why Some Pages Won't Embed
A site can tell browsers not to show its pages inside a frame. It does this with the X-Frame-Options header or the frame-ancestors rule in its Content Security Policy. When that is set, you see a blank frame or an error message.
- Look for an official embed or share option on the site. It often gives you a link made for frames.
- Ask the site owner to allow framing from your domain.
- Link to the page instead of embedding it.
- Use https. Browsers block http content on https pages, so this tool accepts https links only.
Embed Code FAQ
Is the embed code generator free?
Yes. It is free, runs in your browser and needs no account or API key.
Does the tool send my link anywhere?
No. The code is built in your browser. The live preview loads your link straight from that site.
Why does autoplay also mute the video?
Browsers generally block autoplay with sound. So the tool adds mute=1 whenever you turn on autoplay.
What does privacy-enhanced mode do?
It loads the YouTube player from youtube-nocookie.com. YouTube documents this mode as not storing visitor information unless a visitor plays the video.
What is the difference between an iframe and a widget?
An iframe shows content from another page. A widget from Embeddable can be a form, calculator or popup that captures leads, added with one script.
Iframes show content. Widgets capture leads. Describe a form, calculator or popup in plain English and add it to any site with one script.