What country am I in?
Find out in one tap. This tool matches your position against the world's national boundaries inside your browser — your coordinates are never sent to us, to an IP-lookup service, or to anyone else. You get the country, how far the nearest border is, what lies across it, and everything you need on arrival.
You can also click or tap anywhere on the map.
Loading the interactive map…
Press Find my country, search, or click the map to identify a place.
Three ways to identify a country
- Use your location. Press Find my country. Your browser asks permission first, and the coordinates it returns stay on your device. This is the most accurate option — a modern phone knows where it is to within about 5 metres outdoors.
- Click the map. Tap anywhere on Earth to find out which country owns that ground. No permission needed, and it works for places you are only curious about.
- Search or paste coordinates. Type a country or capital, or paste a latitude and longitude such as
48.8584, 2.2945straight from your phone's compass app, a photo's metadata or a GPS receiver.
How country detection actually works
A country is a polygon. Deciding whether you are inside one is a classic piece of computational geometry called a point-in-polygon test: draw an imaginary ray from your position out to infinity and count how many times it crosses the country's outline. An odd number of crossings means you are inside; an even number means you are outside. Counting crossings over every ring at once handles the awkward cases for free — Lesotho, a whole country inside South Africa, and Vatican City, a country inside a city.
This tool runs that test twice. The first pass uses a simplified copy of the world (about 210 KB, downloaded once) and answers instantly. The second pass fetches a small tile of full-resolution Natural Earth boundary data — a few kilobytes covering the 5° square you are in — and re-runs the test there, which is what makes near-border answers trustworthy. Tiles that lie entirely within one country are never generated at all: if there is no border inside the square, the first answer was already certain.
Because both passes run on your own machine, the tool can also measure thedistance from you to the nearest border, and which country is on the other side of it.
Why IP-based country lookup gets it wrong
Most “what country am I in” pages never look at where you are. They look up who owns your IP address, which is a statement about network routing, not geography. It breaks whenever you use a VPN, a corporate network, a mobile carrier that routes traffic through a distant city, satellite internet, or a hotel Wi-Fi registered to a head office abroad. In a border town it is close to useless. Matching real coordinates against real boundaries avoids the whole class of problem — and it is why this tool asks for your location rather than quietly guessing from your connection.
The borders that break country finders
Most of the planet is easy. These are the places that are not, and what this tool does about them:
- Baarle-Hertog and Baarle-Nassau. Twenty-two Belgian enclaves inside the Netherlands, with eight Dutch counter-enclaves inside those. Some parcels are a single house; one café has the border painted across its floor. No global dataset contains them, so the tool says so instead of pretending.
- Campione d'Italia and Büsingen am Hochrhein. Pieces of Italy and Germany completely surrounded by Switzerland, both missing from standard boundary data. We correct these from our own records and label the correction.
- Vatican City. At 0.44 km² it is barely larger than the margin of error of a world boundary dataset, so near St. Peter's the answer is flagged as indicative.
- Atolls and seafronts. Stand on a harbour wall in Ushuaia or in the lagoon at Funafuti and strict geometry says you are at sea. The tool recognises that you are on the coastline within the data's own margin, and says which country's coast it is.
- Dependencies and disputed ground. Greenland is not Denmark, Hong Kong is not simply China, and Western Sahara, Kosovo, Somaliland and Northern Cyprus each get their status spelled out rather than being quietly folded into a neighbour.
What people use this for
- Crossing a land border — confirming you have actually arrived, especially where there is no checkpoint.
- Roaming and phone bills — checking which country your data plan thinks you are in before it thinks it for you.
- Hiking, sailing and flying — knowing whose jurisdiction, airspace or rescue service covers where you are.
- Photo and drone metadata — pasting coordinates from an image to find out where it was taken.
- Remote work and compliance — establishing which country a given location sits in, for tax, licensing or data-residency questions.
- Geography homework and pub arguments — settling exactly whose land a point on the map is.
Your privacy, precisely
When you press Find my country, your browser's geolocation API gives this page your coordinates. They are used in the page's own JavaScript and nothing more: there is no request carrying them to our server, no analytics event containing them, and no third-party geocoding call. The permalink feature writes the coordinates into your own address bar so you can share a result deliberately — that is the only way they ever travel. The one network call that would include them, the optional address lookup, asks for your confirmation first and names the service it would contact.
Country codes you will see in the result
Every country carries several official codes, and the result panel shows the two that matter most. ISO 3166-1 alpha-2 is the two-letter code behind domain endings and phone menus (FR, JP, BR).ISO 3166-1 alpha-3 is the three-letter form used in passports and banking (FRA, JPN, BRA). A numeric ISO code exists too, and sport adds its own: IOC codes at the Olympics and FIFA codes in football, which sometimes disagree with ISO — Switzerland is CH to ISO and SUI to both the IOC and FIFA.
Frequently asked questions
How do I find out what country I am in?
Open this page and press “Find my country”. Your browser will ask permission to share your location; when you allow it, the tool matches your coordinates against national boundaries and names the country straight away. You can also click anywhere on the map, or type a place or a pair of coordinates into the search box — neither of those needs location permission.
Does this tool send my location anywhere?
No. The boundary data is downloaded to your browser once, and the country is worked out on your own device. Your coordinates are never sent to us or to anyone else. The single exception is the optional “Look up the nearest address” button, which asks before it sends anything, because street addresses are the one thing that cannot be resolved offline.
How accurate is it?
The first answer comes from a simplified world boundary set and is accurate to a few kilometres. Within a moment the tool re-checks your point against 1:10,000,000-scale Natural Earth boundaries — roughly 100 metres of accuracy — and tells you how far the nearest border is. Standing within a kilometre of a frontier, that difference matters, which is why the tool shows the distance rather than just a name.
Why is an IP address lookup often wrong?
IP geolocation guesses from network ownership, not from where you physically are. A VPN, a corporate network, a mobile carrier routing through another city, or satellite internet will all place you in the wrong country — it is wrong often enough that it should never be used for anything that matters. GPS coordinates matched against real boundaries do not have that problem.
What happens if I am right on a border?
The tool names the country your coordinates fall in, then tells you how far the nearest border is and which country lies on the other side. If you are within a few hundred metres, treat it as a close call: consumer GPS is typically accurate to 5–10 metres in the open but much worse among buildings or under tree cover, and the mapped border itself has some margin.
Can it tell me which country I am in at sea?
It will tell you that you are not in any country, and how far the nearest land is. Territorial waters normally extend 12 nautical miles (22 km) from the coast and an exclusive economic zone reaches 200 nautical miles (370 km), but neither makes the sea part of a country’s land territory.
Does it work without an internet connection?
The page and its boundary data have to be downloaded once. After that the detection itself needs no network at all — which is exactly why it also works on a plane, on a boat, or on a roaming-disabled phone in a border town.
What about places like the Vatican, Baarle or Campione d’Italia?
Those are flagged explicitly. Vatican City is smaller than the error margin of global boundary data, Baarle is a mosaic of 22 Belgian and 8 Dutch parcels that no world dataset contains, and Campione d’Italia and Büsingen am Hochrhein are missing from the standard boundary sets entirely — so we correct those two from our own records and say so on screen.
Data sources and method
- Boundaries: Natural Earth 1:10m admin-0 countries, public domain — used for both detection passes.
- Country facts: our own dataset covering all 196 sovereign countries, the same one behind every country profile on this site.
- Map tiles: OpenStreetMap contributors. Tiles load only when you scroll the map into view.
- Driving side, plugs and emergency numbers: compiled from public standards and national emergency-service listings. Emergency numbers change — confirm locally before you need one.
Boundaries are shown as commonly mapped and do not imply any position on the part of Countries.World regarding sovereignty or disputed territory. This tool is for information and should not be relied on for navigation, legal or emergency purposes.
Related tools
- Compare two countries side by side — population, area, economy and more.
- Local time in every country — what time it is right now, anywhere.
- All countries A–Z — the full index.
- Random country — for when you want to be surprised.