Generator Tools
HTML Iframe Generator
Generate clean iframe HTML for any URL. Set size or responsive 16:9 wrapper, lazy load, sandbox, allow, referrerpolicy, and copy the snippet.
HTML iframe generator
Allow (Permissions Policy)
Lets the embed use specific browser features. Only enable what the page actually needs.
fullscreenSandbox (restrict the embed)
When enabled, the iframe is fully sandboxed and only the features you tick are restored. Useful for embedding untrusted HTML.
Sandbox attribute is not added. The embed has full default privileges within the same-origin policy.
Responsive iframe (recommended)
Drop this directly into a blog post, CMS body, or any page where the embed needs to scale with its container.
<div style="position: relative; width: 100%; aspect-ratio: 16/9;"> <iframe src="https://www.openstreetmap.org/export/embed.html?bbox=-0.481%2C51.281%2C0.281%2C51.671&layer=mapnik" title="Embedded OpenStreetMap area" loading="lazy" referrerpolicy="strict-origin-when-cross-origin" allow="fullscreen" allowfullscreen style="position: absolute; inset: 0; width: 100%; height: 100%; border: 0;"></iframe> </div>
Plain iframe tag (no wrapper)
Same configuration as a single iframe with width and height attributes if you do not want the wrapper.
<iframe src="https://www.openstreetmap.org/export/embed.html?bbox=-0.481%2C51.281%2C0.281%2C51.671&layer=mapnik" title="Embedded OpenStreetMap area" width="560" height="315" loading="lazy" referrerpolicy="strict-origin-when-cross-origin" allow="fullscreen" allowfullscreen style="border: 0;"></iframe>
How to use
- Paste the URL you want to embed into the URL to embed (src) field, or pick one of the sample buttons.
- Set a short Title so the iframe is announced correctly by screen readers (required for accessibility and Lighthouse).
- Choose Responsive wrapper for fluid layouts or Fixed pixels for exact dimensions, then pick an aspect ratio or width and height.
- Tick the allow flags for any Permissions Policy features the embed needs (autoplay, fullscreen, camera, and so on), and enable Sandbox if you want to restrict an untrusted embed.
- Pick a referrerpolicy and a border style, then copy either the responsive or the fixed snippet from the right panel and paste it into your page.
About this tool
HTML Iframe Generator builds a ready-to-paste iframe HTML snippet for any URL with every attribute you might need: src, accessible title, size (fixed pixels or a responsive wrapper using aspect-ratio), loading lazy or eager, allowfullscreen, referrerpolicy, the allow attribute for Permissions Policy features like autoplay, fullscreen, camera, microphone, encrypted-media, picture-in-picture, clipboard-write, web-share, accelerometer, and gyroscope, and the full sandbox attribute with per-flag toggles for allow-scripts, allow-same-origin, allow-forms, allow-popups, allow-popups-to-escape-sandbox, allow-modals, allow-top-navigation, allow-presentation, and allow-downloads. The tool produces two outputs at once: a plain iframe tag with width and height attributes for inline use, and a responsive wrapper version (an outer div with aspect-ratio and an absolutely positioned iframe that fills it) for blog posts and CMS bodies that need to scale to any column. Aspect ratio presets cover 16:9 for video, 4:3 classic, 1:1 square, 21:9 ultrawide, and 3:4 portrait. A border control offers no border, the default border: 0, or rounded corners. An optional live preview loads the actual URL in your browser so you can see exactly what the embed will look like, including whether the target site allows being framed at all (many block embedding via X-Frame-Options or Content-Security-Policy frame-ancestors headers). Useful for embedding Google Maps, OpenStreetMap, CodePen, GitHub Gists, calendars, forms, dashboards, and any other in-house or third-party page that needs to appear inside another. URL parsing and HTML generation run entirely in your browser, so the URLs and configurations never leave your device.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
YouTube Timestamp Link Generator
Build watch, share, embed, and markdown YouTube links that jump to a chosen start time.
Open tool
GeneratorHTML Table Generator
Editable grid, plain or styled output, alignment, caption, borders, stripes, and live preview.
Open tool
GeneratorMailto Link Generator
Compose a mailto link with cc, bcc, subject, body, and copy-ready HTML and Markdown snippets.
Open tool
DeveloperCSP Header Generator
Visual builder for the Content-Security-Policy HTTP header.
Open tool
DeveloperCORS Headers Generator
Build Access-Control headers with live validation and Apache, Nginx, Vercel, Netlify, Next.js, Worker, and Express snippets.
Open tool
DeveloperURL Parser
Break a URL into protocol, host, path, query params, and fragment with decoded values.
Open tool