Check My Latitude and Longitude, Including Accuracy Radius

Contents
When you need the latitude and longitude numbers for where you are right now, your browser has already calculated those values, along with an accuracy reading (the margin of error). You don't have to open a map app, read the coordinates off the screen, and copy them down by hand. Your browser can give you the numbers directly. This post explains how that coordinate is produced and what each of the accuracy, altitude, and speed values that appear alongside it actually means.
Summary ① Browser location data is an estimate built from Wi-Fi signals and cell tower information, not just satellite GPS. ② The accuracy number is the margin of error in meters. The larger it is, the further the real location may be from the reported coordinate. ③ If the page isn't served over HTTPS (or localhost), the browser blocks the geolocation API entirely.
When do you actually need the raw latitude and longitude numbers?
Map apps are great for finding a destination, but they often don't show you the latitude and longitude numbers themselves. To get coordinates, you have to long-press the map, wait for a popup, and copy the numbers by hand.
Meanwhile, situations that need the raw coordinate numbers come up often. Typical examples include a location field in an online form, a shooting location you need to record with a photo or document, and development work testing location-based features.
What you need in those moments isn't a map screen. It's the numbers. And those numbers are already built into the browser you're using as a standard feature.
How to calculate coordinates yourself with the browser console
These coordinates come from the Geolocation API, a standard feature built into browsers. You can call it directly by opening the developer tools console, no extra tools required.
Press F12 on the page (Cmd+Option+I on a Mac) to open the Console tab, then paste and run the code below.
navigator.geolocation.getCurrentPosition(
(pos) => console.log(pos.coords),
(err) => console.log(err.message),
{ enableHighAccuracy: true, timeout: 10000, maximumAge: 0 }
);
The browser shows a location permission prompt. Once you click Allow, the console prints an object containing latitude, longitude, accuracy, altitude, speed, and the timestamp of the reading.
Location isn't calculated from GPS signals alone
These values aren't built from satellite GPS signals alone. The browser estimates your location by combining GPS signals the device can pick up, information from nearby Wi-Fi access points (APs), and cell tower location data. The result doesn't show which source was actually used.
Why it only works over HTTPS
This feature only works on pages encrypted with HTTPS or on localhost (a local development environment). The standard specification restricts the geolocation API to "secure contexts," so on a plain HTTP page you don't even get a permission prompt — you just get an error.
If you click Block in the permission prompt, the error returned in err.message says the request was denied. The standard specification defines this as PERMISSION_DENIED (code 1). In addition, POSITION_UNAVAILABLE (code 2) is returned when the location can't be determined, and TIMEOUT (code 3) is returned when the response is delayed.
Check it with our tool.
Use the browser's built-in Geolocation API to get latitude, longitude, and accuracy (error radius) plus a Google Maps link and the raw JSON, all in one place.

Parts of the results that often confuse people
There are a few confusing points when reading the numbers on screen.
If you press the button again in the same spot, the decimal digits of the latitude and longitude may shift slightly. Location is an estimate recalculated on every request, so if the mix of signals captured at that moment differs even a little, the result shifts too. The tool requests with maximumAge set to 0, so it recalculates fresh every time with no cache.
Accuracy is "the margin of error in meters around this coordinate." The smaller the value, the more likely your real location is close to that coordinate. The larger the value, the more your real location may be far from it.
Getting null for altitude and speed is not an error. Null is returned when the device has no sensor or movement data to measure those values. Altitude is hard to calculate precisely with an ordinary location sensor alone, and speed has no movement data to work from when the device is standing still.
| Field | Meaning | Why it may be null or large |
|---|---|---|
| latitude / longitude | Estimated latitude and longitude | Recalculated on each request, so the values may shift slightly |
| accuracy | Margin of error (meters) | The larger the value, the further the real location may be |
| altitude | Altitude (meters) | null when there's no sensor or data to measure it |
| speed | Movement speed (m/s) | null when the device is stationary or there's no movement data |
| timestamp | Time of reading | The moment the coordinate was obtained |
Recap
- The latitude and longitude your browser shows is an estimate that combines satellite GPS with Wi-Fi and cell tower information.
- Accuracy is the margin of error in meters. The smaller the number, the closer it is to your real location.
- If the page isn't served over HTTPS (or localhost), the browser blocks the geolocation API call entirely.
- An altitude or speed of null isn't an error. It means there's no sensor or movement data for that value.
- Coordinates are recalculated on every request, so they can shift slightly even in the same spot.
Use the browser's built-in Geolocation API to get latitude, longitude, and accuracy (error radius) plus a Google Maps link and the raw JSON, all in one place.
Frequently Asked Questions
What happens if I deny location permission?
You get an error message instead of coordinates. The browser classifies this as PERMISSION_DENIED, the standard error code, which means the location was never calculated at all. To try again, change the location permission to Allow in your browser's site settings, then reload the page.
Why doesn't location data show up on an HTTP site?
Because, under the standard specification, the Geolocation API is a "secure context" feature that can only be called on pages encrypted with HTTPS or on localhost. On a plain HTTP page, you don't even get a permission prompt — you just get an error.
Can I tell whether my location came from GPS or Wi-Fi?
No. The browser only estimates your location by combining satellite GPS, Wi-Fi access point information, and cell tower data. The result doesn't show which source was actually used. The accuracy number gives you only a rough sense of how reliable it is.
I checked again in the same spot and the coordinates changed slightly. Is that an error?
No, it isn't. Location is an estimate recalculated from the signals captured at that moment on every request, so if the signal mix differs slightly, the decimal digits of the coordinate can shift too.
This article was adapted from our Korean original. Read the Korean original