Map Extract
Free tool

Responsive iframe embed code generator

Enter the address of the page you want to embed, choose a shape and the permissions it needs, and copy clean embed code that scales with the screen. A live preview shows straight away whether the site allows itself to be framed.

Runs in your browser. Nothing you enter is uploaded.

Building the embed code

  1. Paste the page address

    For a map, video or booking widget, use the embed address the provider gives you, not the normal page link. Add a title, which screen readers announce.

  2. Choose the size

    The ratio options (16:9, 4:3, 1:1, 9:16 and 21:9) wrap the frame in a box that holds its proportions on any screen. Choose Fixed size to enter your own width and height, in pixels or as a percentage.

  3. Set behaviour

    Lazy loading delays the frame until a visitor scrolls near it. Allow full screen suits videos. The default border is off unless you want it.

  4. Grant only the permissions needed

    Tick items such as autoplay, clipboard-write, geolocation or payment only if the embedded page needs them. Sandbox restricts the frame further, with exceptions you add one by one.

  5. Copy and preview

    Copy or download the code. The preview loads https addresses directly in your browser so you can see the result.

Example: a map to the workshop on a contact page

A joinery firm (fictional) wants its Google Maps location on the contact page. The embed address goes in, the shape is set to 4:3, lazy loading and full screen stay on, and the referrer policy is set to the one Google's own embed code uses. The generator wraps the frame in a box that keeps its proportions on phones.

Input
Page address: https://www.google.com/maps/embed?pb=EXAMPLE
Title: Map to our workshop
Size: 4:3   Lazy loading: on   Allow full screen: on
Referrer policy: no-referrer-when-downgrade
Result
<div style="position:relative;width:100%;height:0;padding-bottom:75%;overflow:hidden">
  <iframe src="https://www.google.com/maps/embed?pb=EXAMPLE" title="Map to our workshop" allowfullscreen loading="lazy" referrerpolicy="no-referrer-when-downgrade" style="border:0;position:absolute;top:0;left:0;width:100%;height:100%"></iframe>
</div>

Warnings the generator gives

SituationWarningWhat to do
Address starts with httpBrowsers block http frames on https pagesUse the https version of the embed address
No titleScreen readers announce it and accessibility checkers flag itDescribe what the frame shows
Sandbox with both allow-scripts and allow-same-originThe framed page could remove its own sandboxCombine them only for pages you trust
Preview blank or refusedThe site forbids framingUse the provider's embed option, or link to the page instead

Why some sites will not embed

Many websites send a header that tells browsers not to show them inside another site's frame, to protect their visitors from clickjacking. Banks, most social networks and plenty of booking platforms do this for their normal pages. When that happens the preview stays blank, and the same code will be blank on your site too.

The fix is almost always an official embed address. Maps, video platforms, calendar and booking tools usually offer a share or embed option that produces an address built to be framed.

Questions people ask

How do I make an iframe responsive?

Wrap it in a container whose height is set as a percentage of its width, then position the iframe to fill that container. The generator does this for you when you pick a ratio such as 16:9 or 4:3, so the embed keeps its shape on phones, tablets and desktops without extra CSS in your stylesheet.

Should I use lazy loading on an iframe?

Usually yes for anything below the first screen, such as a map at the bottom of a contact page. The browser waits to load it until a visitor scrolls near it, which makes the rest of the page appear sooner. For a video at the top of a landing page you may prefer to switch it off.

What does the sandbox option do?

Sandbox makes the framed page run with restrictions: no scripts, no forms, no pop-ups and no access to its own cookies unless you add exceptions. It is useful when embedding content you do not fully control. Add only the exceptions the embed needs, and avoid combining allow-scripts with allow-same-origin for untrusted pages.

Which referrer policy should I choose?

Leaving the browser default, strict-origin-when-cross-origin, suits most embeds: the embedded site learns your domain but not the full page address. Some providers' own embed code asks for a specific policy, such as no-referrer-when-downgrade for maps; follow their instructions if the embed misbehaves without it.

Where your data goes

The embed code is generated on this page. For the preview, your browser loads the address you entered directly from that site, exactly as your own web page would; nothing passes through Map Extract's servers.

Checked against the tool on

Top