In short: This generator builds the iframe code for the second route and shows the steps for the first. Enter a business or address, choose the options and copy the result.
A map on your contact page helps customers find you and gives Google one more clear sign of where you operate.
How to embed a Google Map in HTML in two ways
The quick way: open Google Maps, search your business, choose Share, open the Embed a map tab, copy the HTML and paste it into your page. The other way uses the Maps Embed API with a key from Google Cloud Console and gives you control over zoom and map type.
The Share method needs no key and takes a minute. The API method is better when you manage several pages or want to change the map without rebuilding the code by hand.
This tool produces the API version. For the Share version, follow the steps above and paste the iframe it gives you.
Using the generator step by step
Type your business name and address, pick the map type and zoom level, and choose a responsive or fixed size. Copy the code, replace YOUR_API_KEY with your own key and paste it where the map should appear. Then load the page and check the pin sits on your business.
Use your full business name plus the city for the best match. If the wrong place appears, switch to a Place ID, which points to exactly one location.
Set a short iframe title such as "Map showing our shop location". Screen readers read it out, and it is good accessibility practice.
Get and protect your Google Maps API key
Create a project in the Google Cloud Console, enable the Maps Embed API and create an API key. Then restrict the key to your website address so nobody else can use it. Google asks for billing details when you set up a project, even for free products.
Restricting the key matters because it sits in your page source for anyone to read. Without a restriction, someone could copy it. Google's pricing page lists Maps Embed API usage as free, but check the current terms before you launch.
Make the embedded map responsive
A fixed width and height break on phones. The responsive option wraps the iframe in a container with a 16:9 ratio and sets the iframe to fill it. The map then scales with the screen. Add loading="lazy" so the map only loads when a visitor scrolls near it.
Lazy loading keeps the map from slowing the rest of the page. On a contact page the map often sits near the bottom, so most visitors never pay the loading cost unless they scroll.
Where a map helps your local SEO
Put the map on your contact page and on each location page, next to your name, address and phone number exactly as they appear on your Google Business Profile. The map itself is not a ranking trick. It confirms the location for visitors and keeps your details consistent.
If you serve customers at their homes, a map of your service area on the city page can help. Do not show a home address you have hidden on your profile.
Embed a map on WordPress, Wix, Squarespace or Shopify
Every major site builder has a custom HTML or embed block. Paste the iframe code into it, save and preview. You do not need a plugin for a simple map.
In WordPress, add a Custom HTML block. In Wix, Squarespace and Shopify, look for an Embed or Code block in the page editor and paste the generated code.
If the map does not show, check that the block accepts raw HTML and that your plan allows custom code.
Make the embedded map load fast and stay accessible
Add loading="lazy" to the iframe so the map loads only when visitors scroll near it, and add a clear title attribute so screen readers can announce what the map shows.
A map is heavier than an image. Placing it lower on the page, or on your contact page, keeps your main content quick.
Always show your address as text next to the map. The map helps visitors, but the text is what search engines and screen readers read first.
Fix the most common embed problems
A blank map, the wrong location or a gray box usually comes from a broken iframe code, a restricted API key or a block that strips code. Check those three first.
If the pin is in the wrong place, search for your business name rather than a street address, or paste the exact address as it appears on your profile.
If you use an API key, confirm it is allowed to run on your domain and that billing is set up in your Google Cloud account.
- Test the page in a private window
- Check the browser console for blocked content
- Confirm the key restrictions match your domain
Keep the map consistent with your Google Business Profile
The place on your map should match the name, address and pin on your Google Business Profile. Mismatched details confuse visitors and weaken your local signals.
Add the embed to your contact page and to location pages, next to the same name, address and phone details shown on your listing.
If you serve customers at their homes and hide your address, show your service area in text and do not publish a precise pin you do not want visible.
Keep going with local SEO
Make your location easier to find
A map is one piece of local visibility. See how we optimize the profile that powers your Maps listing. Book a free 30-minute audit.
Sources: Google Maps Help: Share or embed a map, Google Maps Platform: Maps Embed API overview, Google Maps Platform pricing.