Free Iframe Generator
Generate responsive iframe HTML with custom dimensions, titles, and sandbox permissions. Preview the result and copy the code.
No URL loaded
Enter a URL above or load the demo page.
Customize your embed Dimensions, sandbox & code
Sandbox settings affect the preview and exported code. Scripts + same-origin are convenient for third-party embeds, but are not a security boundary for untrusted content hosted on your own origin.
<!-- Your iframe code will appear here. -->How to generate an iframe embed
- Paste the page’s public HTTPS URL. For services like YouTube, use their official embed URL rather than the regular watch page.
- Set your dimensions and give the iframe a descriptive title for assistive technology.
- Choose responsive width to preserve the selected aspect ratio, or use a fixed size. Keep only the sandbox permissions your content needs.
- Copy the generated HTML into your page and test it in the actual parent site.
What do the settings do?
loading="lazy" defers off-screen content. A descriptive title identifies the frame to screen readers. referrerpolicy="no-referrer" avoids sending your parent page’s URL to the embedded site. The live preview loads eagerly so you can inspect it immediately; the exported code follows your loading setting.
The sandbox attribute starts with restrictions; its tokens restore specific capabilities. Allowing scripts and same-origin together is unsuitable as a security boundary for untrusted same-origin content. Host untrusted content on a separate origin.
Will the generated code bypass a blocked iframe?
No. HTML attributes cannot override a target’s response headers. Use the iframe header checker to inspect X-Frame-Options and CSP before shipping your integration.