To embed a Google Map, open the place in Google Maps, choose Share, then Embed a map, and copy the HTML. Paste it where the map should appear. For a better result, wrap the iframe so it resizes on phones, add loading="lazy", and consider a click-to-load version so Google is only contacted when a visitor asks for the map.
| Way | API key | Notes |
|---|---|---|
| Share, Embed a map in Google Maps | No | Official and simplest; copy the iframe it gives you |
| Maps Embed API (place mode) | Yes, restricted to your site | Official, configurable by address or place, listed by Google at no charge |
| q= address URL with output=embed | No | Common and convenient but not documented by Google, so it could change |
Updated
The generator below writes the code for you from an address, from your own Maps Embed API key, or from the code Google gives you. It always adds a responsive wrapper and a title, and can wrap the map in a click-to-load button.
Type an address or paste Google's embed code to get a responsive iframe, with an optional click-to-load version.
If you already copied Google's iframe, paste it inside this wrapper and delete its width, height and style attributes.
The box keeps a 4 by 3 shape at any width. Replace the src with the one from your copied code.
<div class="map-embed">
<iframe
src="https://www.google.com/maps/embed?pb=PASTE_YOUR_CODE_HERE"
title="Map showing our shop"
loading="lazy"
referrerpolicy="no-referrer-when-downgrade"
allowfullscreen></iframe>
</div>
<style>
.map-embed { position: relative; aspect-ratio: 4 / 3; width: 100%; border-radius: 12px; overflow: hidden; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
</style>
A map iframe is a whole web app loading inside your page. loading="lazy" tells the browser to wait until the visitor scrolls near it, which speeds up the first view for everyone who never scrolls that far.
The CSS aspect-ratio property keeps the map's shape at any width, so you no longer need the old padding-bottom trick. 4 by 3 suits phones well; 16 by 9 suits wide desktop layouts.
The click-to-load version shows a light placeholder with a button. Only when someone presses it does the page create the iframe and contact Google. It is faster and kinder to privacy, and the link under it still opens the full map for anyone who prefers the app.
Yes for the Share, Embed a map code. The Maps Embed API, which needs a key, is listed by Google as free to use. Other Maps products, such as the JavaScript map with custom markers, are billed by usage after a monthly free allowance, so check the current pricing before using them.
The copied code sets a fixed width and height, such as 600 by 450 pixels. Remove those and wrap the iframe in a box that uses CSS aspect-ratio, like the generator's output, so it scales with the screen.
Loading the map sends the visitor's IP address and browser details to Google, and Google may set cookies. In places with strict consent rules, many sites show a placeholder with a Show map button and load the map only after that click, which is what the click-to-load option does. Mention the map in your privacy policy either way.
Directions: use the Directions tab in Google Maps before choosing Share, or the directions mode of the Maps Embed API. Several pins: create a map in Google My Maps, set it to public, then use its Embed on my site option.
Not directly. What helps local search is a complete Google Business Profile and consistent name, address and phone number across the web. The map helps visitors find you, which is reason enough.
Related: HTML embed code generator, Service area map, How to get your business on Google, Contact us page examples, Privacy policy generator.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.