iFrame Generator
Build an HTML iframe embed with custom dimensions, sandbox rules, and lazy loading.
Free & unlimited
URL
Dimensions
px
Title attribute
Options
Preview
<iframe src="https://example.com"
width="600"
height="400"
style="border:none"
loading="lazy"
title="Embedded content"></iframe>All processing happens in your browser. No data is sent to any server.
About this tool
- 1
Enter the source URL
Paste the URL of the page, video, or map you want to embed.
- 2
Set dimensions
Choose width, height, and whether the iframe should be responsive.
- 3
Configure options
Set attributes like allowfullscreen, lazy loading, sandbox, and title for accessibility.
- 4
Copy embed code
Copy the generated HTML snippet and paste it into your website.
- Always set a title attribute on iframes for screen reader accessibility.
- Use the sandbox attribute to restrict what embedded content can do on your page.
- Enable lazy loading for below-the-fold embeds to improve initial page load speed.
- For responsive embeds, use the aspect-ratio CSS property or a padding-bottom wrapper.
- Generates responsive iframe code with aspect-ratio or padding-bottom technique
- Configurable sandbox, allow, and referrerpolicy attributes
- Built-in presets for YouTube, Vimeo, Google Maps, and Spotify embeds
- Accessibility-ready with title and ARIA attributes
- Live preview of the embedded content
- Embed a YouTube video on a blog post with responsive sizing
- Add a Google Maps iframe to a contact page
- Embed a Figma prototype or CodePen demo in documentation
- Create sandboxed iframes for third-party widgets on a secure site
It restricts the iframe content from running scripts, submitting forms, or navigating the parent page unless you explicitly allow those capabilities.
The generator wraps the iframe in a container with aspect-ratio CSS or the classic padding-bottom percentage trick for older browser support.
The target site may set X-Frame-Options or Content-Security-Policy headers that prevent embedding. Not all sites allow iframe embedding.