Mapsgoogle.com/maps

Can you embed Google Maps in an iframe?

Yes. Use the Copy HTML code from Share or embed map. You can also use the Maps Embed API, which needs an API key.

Checked Test again

Live check

What the main page sends

Result of
Maps pageEmbeddable
www.google.com/maps
X-Frame-Options
Not sent
CSP frame-ancestors
Not sent
Response
429 Too Many Requests · 424 ms · HTTPS
Embed URLNot checked
www.google.com/maps/embed/v1/place?key={api-key}&q={place}

Not checked: needs your own link. Google Maps has no public sample we can load.

Test your link

Steps

How to embed Google Maps

  1. On your computer, open Google Maps.
  2. Go to the part of the map that you want to show.
  3. At the top left, clickMenuthenShare or embed map
  4. Click Embed a map. Then click Copy HTML.
  5. Paste the HTML into your page.

Embed code

Paste this into your page

HTML
<iframe
  src="https://www.google.com/maps/embed/v1/place?key={api-key}&amp;q={place}"
  width="600"
  height="450"
  style="border: 0"
  loading="lazy"
  allowfullscreen
  referrerpolicy="strict-origin-when-cross-origin"
  title="{map title}">
</iframe>

This is the Maps Embed API code. It needs an API key. Copy HTML from Share or embed map gives a different embed code.

URL patterns

Swap the link you have for the embed URL

  • You havePlace markerUse in the iframe/maps/embed/v1/place?key={api-key}&q={place}
  • You haveMap with no markerUse in the iframe/maps/embed/v1/view?key={api-key}&center={lat},{lng}
  • You haveDirectionsUse in the iframe/maps/embed/v1/directions?key={api-key}&origin={a}&destination={b}
  • You haveStreet ViewUse in the iframe/maps/embed/v1/streetview?key={api-key}&location={lat},{lng}
  • You haveSearch resultsUse in the iframe/maps/embed/v1/search?key={api-key}&q={search}

The Maps Embed API needs an API key from a Google Cloud project. Restrict the key to your site.

Good to know

  • You cannot share a map with your saved places or a distance measurement.
  • All Maps Embed API requests are free, with no usage limit.
  • Embedded maps are not supported below 200 px in width or height.
  • The Maps Embed API can show ads on the map.

Sources

Profile updated

Know before you embed.

Free, no sign-up, nothing stored. Paste a URL and get a verdict, a live preview, and the fix.