HTML embed builder

Iframe Generator

Build iframe markup with a descriptive title, responsive sizing and deliberate permissions. Copy the finished HTML or save a text snippet for your website.

Local code generation only. Your entered URL is never fetched or displayed here. This tool cannot check whether a destination is safe or permits embedding.

Configure your iframe

Content and dimensions
Absolute HTTP(S) URL, up to 2048 UTF-8 bytes. Use the provider's embed URL. No credentials or raw spaces. Internationalized hostnames must use their ASCII punycode spelling.
Describe the purpose, for example “Product setup video”. Limit: 120 UTF-16 code units. Most characters count as one; many emoji count as two. Oversized text is kept so you can shorten it.

Whole numbers from 1 to 20000 px. Responsive modes fill the available width up to the maximum. Fixed mode can overflow narrow screens.

Sandbox restrictions
Lift only restrictions the provider needs
Optional media permissions

Selected features are allowed for the source origin, subject to browser and parent-page policies. Camera, microphone, geolocation and payment remain explicitly denied.

Generated HTML

Enter a URL and title, then generate your code.

This is a markup builder, with no live destination preview. Publishing the generated HTML will make your visitors' browsers request the destination.

How to generate and use an iframe

  1. Copy the provider's official embed URL. A normal watch, share or article URL may not be an embeddable endpoint. Paste a full HTTP or HTTPS address.
  2. Give the frame a title that describes its purpose. Choose a size, loading behavior and the smallest set of permissions the content needs.
  3. Generate and review the HTML. Paste it into your site's HTML editor and test on your own site, including on a phone and with keyboard navigation.

Choose the right sizing mode

Responsive aspect ratio keeps a width-to-height proportion. A 16:9 frame at 960 px wide is 540 px tall; at 320 px wide it is 180 px tall. Full width with fixed height is often useful for forms or maps. Fixed size keeps the specified pixel dimensions and may overflow small containers. These options resize the frame's viewport. They do not measure the remote document or automatically fit its content.

Understand the security and privacy choices

An empty sandbox="" applies restrictions. Removing the attribute removes those sandbox restrictions. Each allow-* token lifts a specific restriction. Combining allow-scripts and allow-same-origin can let content on the same origin as your page remove the sandbox and reload. Use a separate origin for untrusted content, review provider instructions, and do not treat generated code as a security assessment.

The default referrerpolicy="no-referrer" suppresses the Referer header for the iframe navigation. It may break providers that require referral information. It does not hide visitors' IP addresses, erase URL query parameters or guarantee anonymity. Media permissions cannot override restrictions set by your site or the browser. Sandboxing may also prevent native PDF viewers or interactive widgets from working.

Why correct markup can still fail

A destination can deny framing with X-Frame-Options or CSP frame-ancestors. Your page's CSP frame-src, mixed-content rules, authentication, cookies, redirects or provider embed requirements can also affect it. This generator cannot test or bypass those policies. Prefer HTTPS; an HTTP iframe is generally blocked inside an HTTPS page. A fallback link belongs outside the iframe because content inside an iframe element is not a reliable fallback.

Local processing and supported input

This tool's code processes inputs only in this page's memory. It does not fetch the entered URL, store input, send it to a service, or read the clipboard. Clipboard writing happens only when you choose Copy HTML. Downloads contain plain text and will not load the iframe when opened as text. The shared site shell controls any site analytics separately. Do not include credentials or private access tokens in embed URLs you publish.

Supported URLs use explicit HTTP(S) and an ASCII hostname spelling, including punycode, or a standard IP literal. Queries and fragments are preserved. Raw whitespace, credentials, ambiguous numeric hosts and invalid percent escapes are rejected. This is syntax validation only, with no DNS, ownership, availability or destination safety checks. JavaScript and modern CSS support are required for local generation and responsive aspect-ratio output.

Standards: HTML iframe element, accessible frame titles, referrer policies, and CSP framing restrictions.