Location tool

What country am I in?

Point-in-polygon against Natural Earth country boundaries.

Short answer

The tool tests your point against Natural Earth 1:50m country outlines in your browser and returns the country name, its ISO 3166 two and three letter codes, and its continent. Points at sea return no country.

Click the map, search, or use GPS. Lookups run in your browser when the boundary file is loaded.

A point near the 180° meridian

Russia and Fiji both have land on each side of the 180° meridian. A flat point-in-polygon test treats their outlines as shapes that wrap most of the way around the world, and would report Russia for a click in Finland. This tool tests containment on the sphere instead, so a click on Taveuni in Fiji, at 179.95° W, returns Fiji and a click in Lapland returns Finland.

How to use it

  1. Tap Use GPS, search a place anywhere in the world, or click the map.
  2. The country outline file loads once. The point is then tested against every country in your browser.
  3. The card shows the country name, its ISO 3166 two-letter and three-letter codes, and its continent.
  4. A message instead of a card means the point is at sea or on land too small for the outline file. Zoom in and click on the mainland to check.

How the country is found

The page loads the world-atlas file, a compact version of the Natural Earth 1:50m admin-0 countries. For your point it checks each country outline with a spherical containment test from the d3-geo library. The first country that contains the point is the answer.

No server sees your location for this step. Search uses the Photon geocoder to turn a typed place into coordinates, and GPS uses your device.

What 1:50m means for small places

At 1:50 million scale, small islands, narrow peninsulas, and tiny states can be missing or simplified. A point on a small island can come back as open ocean. Borders are also smoothed, so a point very close to a border can land in the neighbor.

Natural Earth draws de facto boundaries. Disputed areas appear the way Natural Earth shows them, which may not match the position of any one government.

ISO codes in the result

The two-letter code is the ISO 3166-1 alpha-2 code used in domain names and many forms, such as US or FR. The three-letter alpha-3 code, such as USA or FRA, is common in statistics tables. Some Natural Earth units have no ISO code; the card shows n/a in that case.

For a full postal address instead of a country, use coordinates to address.

Common questions it answers

Travelers use it to confirm which side of a border a hotel or trail sits on. Researchers use it to label survey points or photos with a country code before loading them into a spreadsheet. For a list of points, geocode them first with address to coordinates, then check each here. On a boat or plane the answer is usually no country, since the outlines stop at the coast and do not include territorial waters.

Questions people ask

Why does my island show as ocean?

Natural Earth at 1:50m leaves out or simplifies small islands, so a point on one can fall outside every outline.

Is my location sent anywhere?

Not for the country test, which runs in your browser. Search sends the typed text to Photon.

How are disputed areas handled?

As Natural Earth draws them, which shows de facto control.

Sources and data as of

Data as of: Natural Earth 1:50m admin-0 outlines via world-atlas 2.0.2.

  1. 01world-atlas 2.0.2 (Natural Earth 1:50m)
  2. 02Photon geocoder (OpenStreetMap data)

How every number is computed: methodology. Spotted a wrong figure? Report an error.