Skip to content
iframetest.dev

Free Iframe Generator

Generate responsive iframe HTML with custom dimensions, titles, and sandbox permissions. Preview the result and copy the code.

Your embed code is generated locally in your browser.

Live preview
</>

No URL loaded

Enter a URL above or load the demo page.

Waiting for a URL1280 × 800 px / scaled to fit
The preview loads directly from the target website.
Customize your embed
Sandbox permissions

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.

HTML embed code
<!-- Your iframe code will appear here. -->

How to generate an iframe embed

  1. Paste the page’s public HTTPS URL. For services like YouTube, use their official embed URL rather than the regular watch page.
  2. Set your dimensions and give the iframe a descriptive title for assistive technology.
  3. Choose responsive width to preserve the selected aspect ratio, or use a fixed size. Keep only the sandbox permissions your content needs.
  4. 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.

Iframe guides

All guides