Free Location Widget for Your Website
Copy one iframe line from our embed builder and your site shows visitors their live location — coordinates, address and map — with zero API keys, zero cookies and zero tracking. It's free, works on WordPress, Shopify, Wix, plain HTML and React, and never sends visitor coordinates to any server.
What the widget is — and a 30-second demo
The What Is My Location widget is a small, self-contained page you drop into your own site inside an iframe. When a visitor taps Show my location, their browser asks for permission, the position is computed on their device, and the widget shows coordinates in several formats, a reverse-geocoded address, and an OpenStreetMap pin. Nothing about the visitor is stored by us — no cookies, no analytics beacons, no fingerprinting. You can see the exact thing your visitors would see on the live widget page, and configure your copy in the embed builder.
Embed it with one line
Paste this where you want the widget to appear:
<iframe src="https://whatismylocation.ai/widget"
width="100%" height="420" style="border:0;border-radius:12px"
allow="geolocation" title="What is my location"></iframe>The allow="geolocation" attribute is required — without it browsers block the position request inside iframes. Height 380–460 px suits most layouts; the widget is responsive down to 280 px wide.
Options you can configure
The embed builder generates the URL for you, but the parameters are simple enough to hand-write: ?theme=dark or light to match your site (omit it to follow the visitor's system preference), &units=imperial for feet/miles, and &lang=es (or any of our 35 languages) for localized labels. Example: /widget?theme=dark&lang=hi renders the dark widget in Hindi. Parameters combine freely and nothing else is needed — no key, no account, no quota.
WordPress, Shopify, Wix, React
- WordPress: use our tiny WP plugin (adds a
[whatismylocation]shortcode), or paste the iframe into a Custom HTML block. - Shopify / Wix / Squarespace: every builder has an "embed / custom HTML" element — paste the same iframe line.
- React / Vue / Svelte: render the iframe directly; it's stateless, so no lifecycle handling is needed.
- AMP or email: iframes with geolocation don't run there — link to the full page instead.
Who uses a location widget — real use cases
- Delivery & logistics pages: let customers grab exact coordinates for hard-to-find addresses before checkout.
- Travel & outdoor blogs: readers check where they are relative to your trailheads and route maps.
- Event and venue sites: "how far am I?" without forcing an app install.
- Field-work and survey teams: a bookmarkable page that reads out GPS coordinates on any phone.
- IT help desks: quickly confirm a remote user's approximate location and timezone during support calls.
Why it's safe to embed — the privacy design
Geolocation happens entirely in the visitor's browser and is only triggered by their explicit tap, so embedding the widget does not create a GDPR processing headache for you: no consent banner is required for the widget itself because it sets no cookies and runs no third-party trackers. The reverse-geocode lookup is proxied through our server without storing coordinates, our privacy guide documents the whole data flow, and the widget is the only page on this site allowed to render inside a frame — your users can't be clickjacked into other tools. If you later need programmatic access instead of a UI, the same guarantees apply to the free developer API.
Widget vs API — which one do you need?
| Widget (iframe) | Developer API | |
|---|---|---|
| Setup | One HTML line | API key (free) + a fetch call |
| UI included | Yes — map, formats, address | No — JSON only, you build the UI |
| Visitor permission | Handled by the widget | You call the browser geolocation API yourself |
| Best for | Content sites, shops, blogs | Apps, dashboards, automations |
| Cost | Free | Free tier, generous limits |
Start with the widget; graduate to the API when you need the raw numbers inside your own code.
Step by step
- Open the embed builder and pick a theme, units and language for your site.
- Copy the generated iframe line (it already includes allow="geolocation").
- Paste it into your page — Custom HTML block, shortcode, or JSX.
- Publish and test on a phone: tap “Show my location” and confirm the permission prompt appears.