Need to embed a map, a video or another page inside your own page? This free iframe generator builds the embed code for you — paste a URL, set the size, and copy a clean iframe tag that works in WordPress, Shopify, Wix and plain HTML. The code is generated entirely in your browser, nothing is uploaded, and there is no account to create.
The generator adds lazy loading by default, so the embedded page only loads when a visitor scrolls to it, and it keeps the code short enough to paste anywhere. For a related job, try the Mailto Link Generator or the Social Share Buttons Generator.
How to use
- Paste the page, map or video URL you want to embed into the URL box above.
- Set the width and height — use 100 percent width with 450 pixels height for a responsive embed.
- Choose lazy loading and a border, then click Generate code to build the iframe tag.
- Copy the code, paste it into your page, and preview the result right here first.
Why use Toolsvine
A YouTube video embedded at 100 percent width and 450 pixels height fills an 800-pixel blog column perfectly, loads lazily so the page stays fast, and needs no plugin at all. Most embed tools hide the code behind a sign-up form or inject tracking scripts, but this one runs locally and hands you a plain iframe tag you fully own. It is free, needs no account, and the code it produces works in every modern browser and content platform.
How does the iframe generator work?
Yes. Paste any web address into the box, pick a width and height, and the tool builds a complete iframe embed tag in your browser. An iframe is a window inside your page that shows another page, so a map, a video or a form can live inside your article without any plugin or server code.
The generator escapes the URL and title for safe HTML, adds loading lazy so the embedded page does not slow down your first paint, and sets a border of zero so the frame blends into your design. You can preview the embed right on the page before copying the code, which catches blocked sites early — some sites refuse to be framed, and the preview shows a blank box when that happens.
Worked example: embedding a YouTube video in a blog post
Take a blog post column 800 pixels wide and a YouTube video you want inside it. Set the URL to the video embed address, the width to 100 percent and the height to 450 pixels. The result is an iframe that fills the column, keeps the 16 to 9 video shape at 800 by 450, and loads only when a reader scrolls to it. The code is five lines long and pastes straight into WordPress, Shopify or plain HTML.
| Detail | Value in the example |
|---|---|
| Embed URL | https://www.youtube.com/embed/aqz-KE-bpKQ |
| Width | 100% (800 px on this page) |
| Height | 450 px |
| Aspect ratio | 16:9 (800 by 450) |
| Loading | Lazy — loads on scroll |
Try it yourself: paste the same kind of embed URL above and the code should match. If the preview stays blank, the site you are embedding refuses to be framed — use its own share button or an official embed instead.
What should I watch out for when embedding an iframe?
The most common mistake is embedding a site that blocks framing. Banks and many login pages send a header that forbids iframes, so the embed shows a blank box however good the code is. Always preview first, and when a site blocks you, use its official embed option — YouTube, Google Maps and most form tools publish one.
A second mistake is a fixed pixel width on mobile. A width of 800 pixels overflows a 390-pixel phone screen, so use 100 percent width and a fixed height instead. For a related job, the Social Share Buttons Generator builds share links for the same page.
Frequently asked questions
Will an iframe slow down my page?
Only a little, and only when it loads. The generator adds lazy loading, so the embedded page does not start loading until a visitor scrolls near it. Your page itself loads at full speed. If the embedded page is heavy — a map with many markers, for example — it still costs load time once it appears, so keep embeds below the fold when you can.
Why does my iframe show a blank box?
The site you are embedding is probably blocking it. Many sites send a header called X-Frame-Options or a frame-ancestors rule that forbids other sites from framing them, and the browser enforces it. There is no code fix for that. Use the site's official embed instead, or link out to the page normally.
What size should I use for an embedded video?
Use 100 percent width and a height that matches the video's shape: 450 pixels for a 16 to 9 video in an 800-pixel column, or 315 pixels for the classic 560 by 315 YouTube size. A percentage width keeps the video responsive on phones, while a fixed height stops the page from jumping while the video loads.
Is the generated code safe to paste into WordPress?
Yes. The code is a plain iframe tag with no scripts and no tracking, and WordPress accepts it in a Custom HTML block. Shopify, Wix, Squarespace and plain HTML pages accept it the same way. Always preview the embed here first, because a blocked site shows a blank box in WordPress exactly as it does here.
Can I embed a page that needs a login?
Technically yes, but visitors will see the login screen inside the frame, and many logged-in sites block framing entirely. It is a poor experience for readers. Link out to logged-in pages instead, and reserve iframes for public content like videos, maps, forms and documents that anyone can view.