November 4, 2026

Where EXIF data stores a photo's location, and how to read it

Short answer: EXIF data keeps a photo's location in its own GPS block, a sub-directory of the EXIF metadata. Latitude and longitude are each stored as three fractions (degrees, minutes, seconds) plus a letter saying which hemisphere: N/S and E/W. The same block can also hold altitude, the UTC time of the fix, which way the camera was pointing and how accurate the fix was.

That is more than a pin on a map, and most guides stop at "your photo has GPS in it". Below is what each field actually says, how to turn it into coordinates you can check, and what removing it does and doesn't achieve.

The GPS block, field by field

In a JPEG, the main EXIF directory holds a pointer tag called GPSInfo (0x8825). It points at a separate directory, the GPS IFD, which holds the location tags. These are the ones that matter for privacy, with their tag numbers from the EXIF standard:

TagIDWhat it holds
GPSLatitudeRef0x0001N or S
GPSLatitude0x0002Three fractions: degrees, minutes, seconds
GPSLongitudeRef0x0003E or W
GPSLongitude0x0004Three fractions: degrees, minutes, seconds
GPSAltitudeRef / GPSAltitude0x0005 / 0x0006Above or below sea level, and the height in metres
GPSTimeStamp / GPSDateStamp0x0007 / 0x001dWhen the fix was taken, in UTC
GPSSpeed, GPSTrack0x000d, 0x000fHow fast and in which direction the device was moving
GPSImgDirection0x0011Which way the camera was facing, in degrees from true or magnetic north
GPSProcessingMethod0x001bHow the position was found: the spec lists GPS, CELLID, WLAN or MANUAL
GPSHPositioningError0x001fThe estimated horizontal error of the fix, in metres
GPSDestLatitude and friends0x0013–0x001aA second location: the subject, not the camera

Not every device writes every tag, and the set varies by make, model and settings. Check your own files rather than assuming.

Two of these deserve a second look. GPSImgDirection tells someone which way you were facing, which turns "somewhere on this street" into "this side of this street, looking at that building". And comparing GPSTimeStamp (UTC) with the camera's local DateTimeOriginal gives away your time zone offset, even if you've edited the visible date.

How the coordinates are encoded

Each coordinate is stored as three unsigned fractions, numerator over denominator, with the sign kept separately in the Ref letter. A position of 40° 26′ 46.30″ N, 79° 58′ 56.10″ W is written roughly like this:

GPSLatitudeRef   N
GPSLatitude      40/1  26/1  4630/100
GPSLongitudeRef  W
GPSLongitude     79/1  58/1  5610/100

Some devices skip the seconds and put fractional minutes in the second value instead, for example 40/1 2677/100 0/1. Both forms mean the same thing.

To get the decimal degrees a map app understands:

decimal = degrees + minutes / 60 + seconds / 3600

Then make it negative for S or W. For the example: 40 + 26/60 + 46.30/3600 = 40.446194, and 79 + 58/60 + 56.10/3600 = 79.982250, so −79.982250. Paste 40.446194, -79.982250 into any map search and you get the spot.

The sign is where homemade scripts go wrong. The fractions are unsigned, so a reader that ignores GPSLongitudeRef puts every photo taken west of Greenwich in the wrong hemisphere. If a viewer puts your photo in the middle of an ocean or on the wrong continent, that's usually the cause.

How precise is it?

The number of digits isn't the same as accuracy, but it sets a ceiling on how exact the position can be. For latitude, roughly:

Stored precisionAbout
1 degree111 km
1 minute1.85 km
1 second31 m
0.01 second, or 5 decimal places in decimal degrees0.3 m to 1.1 m

A degree of longitude is the same width at the equator and narrows towards the poles. Stored precision is often far finer than the fix itself is accurate to.

Real accuracy depends on the fix. Outdoors with a clear sky, a satellite fix can be within a few metres. Indoors, or with only Wi-Fi or cell positioning, it can be off by tens or hundreds of metres. When a device writes GPSHPositioningError, that is its own estimate of the error radius. When it writes GPSProcessingMethod, you can tell a satellite fix from a network guess.

So the honest reading of a GPS block is "the device believed it was here, give or take". That is usually more than enough to find a home address.

How to read it yourself

With ExifTool, which shows every GPS tag along with the group it came from:

exiftool -a -G1 -gps:all photo.jpg

For one line of signed decimal coordinates ready to paste into a map, use the composite GPSPosition tag with -n (numbers rather than formatted text):

exiftool -n -GPSPosition photo.jpg

To catch location stored outside the EXIF GPS block as well, list every tag whose name starts with GPS, in any group:

exiftool -a -G1 "-gps*" photo.jpg

That third command matters. Editors and photo managers can write a second copy of the coordinates into XMP (as XMP-exif:GPSLatitude and so on, in a text form like 40,26.7717N). A tool that only clears the EXIF GPS block leaves that copy behind.

In the browser, the image metadata viewer reads JPEG, PNG and WebP files without uploading them and flags GPS present when it finds coordinates. It doesn't open HEIC, so convert iPhone photos first.

On a phone, the built-in info panels show a map pin but not the raw tags. The steps are in how to check photo metadata on iPhone and how to view photo metadata on Android. How to view EXIF data on any device covers Windows and Mac.

Location that isn't in the GPS block

Removing the GPS tags removes coordinates. It doesn't necessarily remove everything that names a place:

Removing it

ExifTool can delete the EXIF GPS block with exiftool -gps:all= photo.jpg. Run the "-gps*" listing above afterwards to check for XMP copies and place names.

The GPS remover takes the blunter approach: it redraws the image in a browser canvas and saves a new file from the pixels alone. A canvas holds only pixels, so every metadata segment goes (EXIF, XMP, IPTC and C2PA alike), including copies a tag-by-tag tool might miss. It runs in your browser and nothing is uploaded. It accepts JPEG, PNG and WebP, and keeps the input format. The tradeoff: a JPEG is re-encoded at quality 0.95, so the pixels are not bit-identical to the original. Keep the original if that matters, and share the cleaned copy.

For the per-device version of all this, see how to remove location from a photo.

What reading or removing EXIF location doesn't protect against

The short version

EXIF location data lives in the GPS IFD: latitude and longitude as degrees, minutes and seconds, with N/S and E/W setting the sign, alongside altitude, a UTC timestamp, often the compass direction and sometimes an accuracy estimate. exiftool -n -GPSPosition turns it into map-ready coordinates, and "-gps*" finds the copies outside the GPS block. To be sure it's all gone, rebuild the file from pixels and then check again.