Geolocation basics

Browser Geolocation vs IP Geolocation: What's the Difference?

Browser geolocation and IP geolocation work very differently. Learn how each is produced, how accurate they are, who controls them and how to protect each one.

When a website seems to know where you are, it usually got that information in one of two ways. Either your browser told it, through the Geolocation API, or the site worked it out from your IP address. The two methods differ in precision, in who controls them and in which privacy tools affect them. Mixing them up is the most common reason people think a privacy tool "isn't working".

Key takeaways

  • Browser geolocation needs your permission and can be accurate to a few metres.
  • IP geolocation needs no permission and is usually accurate only to a region or city.
  • Location Guard and browser permissions control the first; VPNs, proxies and Tor control the second.

What browser geolocation is

Browser geolocation is a standard JavaScript interface, the W3C Geolocation API. A page calls navigator.geolocation.getCurrentPosition(), the browser asks you for permission, and if you agree it returns a latitude, a longitude and an accuracy radius.

The browser builds that position from the best sources available on your device: satellite positioning (GPS and similar systems) on phones, the Wi-Fi networks around you, nearby mobile cell towers, or the operating system's location service. Wi-Fi-based positioning looks up the networks you can see in a large database maintained by a location provider. In cities, that alone can place you within tens of metres. Read more in How browser geolocation works.

What IP geolocation is

Every connection to a website reveals your public IP address; without it, the site couldn't send a response back. IP geolocation providers maintain databases that map ranges of IP addresses to places. They build them from regional internet registry records, network routing information, data shared by internet providers and other signals.

The result is an estimate for the address block, not for your device. It is usually right about the country, often right about the region, and much less reliable at city level. Mobile networks and large providers may route traffic through hubs in another city, and many results point to the centre of a town or a provider's facility rather than to any home.

Side-by-side comparison

Browser geolocationIP geolocation
How it's obtainedMeasured on your deviceLooked up in a database
Permission requiredYes, per siteNo
Typical precisionMetres to hundreds of metresRegion or city
Works on HTTP pagesNo — secure contexts onlyYes
Changed by Location GuardYesNo
Changed by a VPN, proxy or TorNoYes
Common usesMaps, navigation, "near me" search, deliveryLanguage and currency defaults, regional content, fraud checks, analytics

How to tell which one a site is using

  • A permission prompt appeared. The site requested browser geolocation.
  • No prompt, but the site shows your city. Almost certainly IP geolocation — or information from your account.
  • The site shows your street. That level of detail almost always comes from browser geolocation you allowed earlier, or an address you saved.

You can see both signals yourself with our browser location test and IP location checker. The checker can also show the distance between them.

Protecting each channel

Browser geolocation

  • Deny location requests you don't need, or block them by default in the browser's settings.
  • Grant one-time permission where your browser offers it.
  • Use Location Guard in Firefox to share an obfuscated or fixed position instead of your real one.

IP geolocation

  • A VPN makes sites see the VPN server's IP address and location.
  • Tor Browser routes traffic through several relays and shows the exit relay's address.
  • Some providers offer relay services that keep only a rough region.

Why you often need both

A VPN without geolocation controls leaves your precise position one click away: allow a single prompt and the site knows your street, regardless of the VPN. Geolocation controls without a VPN leave your region visible to every site. Combining them, and keeping the regions consistent, covers both channels. Our location privacy checklist walks through the full setup.

Common misconceptions

  • "Incognito hides my location." It doesn't. Private modes don't change your IP address, and sites can still request geolocation.
  • "My IP address reveals my home address." Not to ordinary websites. Public IP geolocation databases don't contain street addresses, although your internet provider knows which customer had an address at a given time.
  • "If I deny location, sites can't tell where I am." They can still estimate your region from your IP address.

Frequently asked questions

Which is more accurate, browser or IP geolocation?

Browser geolocation, by a wide margin. It is measured on your device and is often accurate to tens of metres, while IP geolocation is an estimate for a block of addresses that is usually only reliable at regional level.

Can a website get my GPS location without asking?

Not through the browser. The Geolocation API requires permission. A site can still estimate your area from your IP address, and apps installed on your device follow different rules.

Does Location Guard change my IP location?

No. Location Guard only alters the position returned by the browser's Geolocation API. Use a VPN, proxy or Tor to change what your IP address reveals.