Google Maps link to coordinates

Paste a Google Maps link and get its latitude and longitude back, ready to copy. For a place link that means the place's pin rather than the centre of the map, plus its place ID and CID when the link carries them. It runs in your browser, so the links you paste go nowhere.

Paste links copied from your browser's address bar, up to 500 at a time. Nothing leaves your browser.

Where the coordinates in a Maps link are

A place link holds two pairs. Right after the @ comes the centre of the map as it was on screen, then the zoom (17z). Further along, in the data= part, !3d and !4d hold the place's own pin. The two differ by however far the map had been panned, so the tool takes the pin whenever the link has one. Code that only reads the @ pair gets the view, not the place.

Links built with Google's Maps URLs format carry coordinates in query=, destination= or center= when they were written as numbers; older links use q= or ll=. A dropped pin's link spells them in degrees, minutes and seconds (40°44'54.4"N), which the tool converts to decimal. For a directions link it reads the destination: from the path or destination=when it's written as numbers, otherwise from the place data Maps keeps for each stop after data=.

Place ID, CID and feature ID

Many place links also identify the listing. !1s0x…:0x… is its feature ID, and the second half of that, read as a decimal number, is the CID, which is how our own exports fill the cid column. The place ID (it usually starts ChIJ) shows up after !19s or in query_place_id=, and some links are nothing but ?cid=. These name the listing rather than a point on the map. Keep them as text: a CID has up to 20 digits, more than a spreadsheet keeps in a number. Why they matter for deduping and refreshing a list is in what a place ID and CID are.

Coordinates for a whole list of businesses

Collecting links one at a time is fine for a handful of places. For every dentist in a city, a scrape is quicker: each row of a Hubertino export already has the latitude, longitude, place ID, CID and Maps link, next to the phone, website and email columns. The Google Maps data extractor page lists every column, and the Google Maps scraper itself starts with 100 free credits.

Questions

Why are the coordinates after the @ slightly off from the place?

Because they're the centre of the map you were looking at, not the place. A place link also carries the pin itself, in the !3d (latitude) and !4d (longitude) values further along, and that's the pair this tool reads when it's there.

Can it convert a maps.app.goo.gl short link?

No. A short link is a redirect, and a web page can't follow a redirect to another site from your browser and read where it lands. Open the short link, let Google Maps load the place, and copy the full URL from the address bar.

How many decimal places do I need?

Five decimal places of latitude is about a metre, six about ten centimetres. The links Google Maps writes carry six or seven, so keep them as they are.

Is the link sent anywhere?

No. The page reads the link with code running in your browser; nothing is uploaded, logged or stored.

Need coordinates for thousands of places?

Hubertino exports every business in an area with coordinates, place IDs, phones and emails: 100 free credits, no card.

Start free with 100 credits