What city am I in?

Press Find me and the map shows the city, town or village you are in, and the cities and towns nearest to you with their population, distance and direction.

How to use it

  1. Press Find me and allow the browser to use your location.
  2. Read the city, town or village in the first card, and the nearest larger places with their distance and direction in the table.
  3. Type a place, click the map, or drag the pin to check another point.

5 practical uses

  1. Name the town you are driving through, or the one behind the next hill.
  2. Find the nearest larger cities and how far they are, for fuel, a hospital or a station.
  3. Tag a photo, a run or a field note with the right place name.
  4. Check whether an address falls inside the city limits or a suburb.
  5. Find the city and the region for a coordinate pair from a spreadsheet.

The maths behind it

The geocoder names the smallest place whose boundary holds the point. The nearest-cities table uses the haversine formula for the great-circle distance from the point to each place, d = 2R·asin(√(sin²(Δφ/2) + cos φ₁ cos φ₂ sin²(Δλ/2))), and the bearing from the forward azimuth formula.

How accurate it is

A phone with GPS is accurate to a few metres outdoors; a laptop on Wi-Fi is often within a hundred metres, and a wired desktop may be placed at the nearest exchange, a town away. Near a boundary, drag the pin to check. Which name counts as "the city" is the geocoder's choice: in a large city it may name the borough or the district first. The nearest-cities list uses GeoNames places with 5,000 or more people.

Privacy

The page never stores your position. The link in the address bar carries the coordinates so you can share or bookmark the result; clear it if you would rather not.

Questions and answers

Why does it name a district instead of the city?

The geocoder returns the smallest named place at the point. In a large city that can be a borough or a suburb; the city itself is in the "Where this is" card.

Where does the nearest-cities list come from?

From GeoNames, the open gazetteer: every populated place with 5,000 or more people, with the population it records. Distances are to the centre of each place.

Can I use it without sharing my location?

Yes. Type any place in the box or click the map. The geolocation permission is only asked for when you press Find me.

Embed this tool on your website

Paste this code where the tool should appear. It shows the tool alone, without this page's text, and links back here. It is free to use; the map data credit stays on the map.

<iframe src="https://waymorphic.com/tools/what-city-am-i-in?embed=1" width="100%" height="760" style="border:0;border-radius:12px;max-width:100%" loading="lazy" allow="geolocation; fullscreen; clipboard-write" title="What city am I in? – Waymorphic Map"></iframe>

Change height to suit your page. To open the tool with a place already set, add the settings from this page's address bar (the part after #) to the end of the src. The embedded tool asks the visitor's browser for their location only when they press the button, and the allow attribute lets that work inside the frame.