What your photos leak: EXIF metadata and GPS

By

Many photos embed EXIF metadata such as GPS coordinates, timestamps, and device information. Learn what it stores, who strips it, and how to check.

~~~

Many photos you take with your phone carry a hidden payload.

Inside the file, next to the pixels, there can be a block of metadata called EXIF (Exchangeable Image File Format). It can record when the photo was taken, with what device, with what settings — and exactly where you were standing.

Send that file to someone, and they can read all of it. Let’s look at what’s in there.

What EXIF stores

EXIF data lives in a segment of the JPEG file (the APP1 segment, right after the file header). It’s organized in groups of tags:

The camera settings are harmless. Photographers rely on them.

The timestamps and GPS coordinates are the problem.

How GPS ends up in your photos

When you first opened the camera app on your phone, it asked for location permission. If you tapped yes (most people do), every photo since then has your coordinates embedded in it.

The precision is not “somewhere in Milan”. It’s decimal degrees with six decimal places — roughly 10 centimeters. A photo taken at home pinpoints your home.

The coordinates are stored as three rational numbers (degrees, minutes, seconds) plus a reference letter (N/S, E/W). Converting to the decimal format you’d paste into a map is straightforward:

decimal = degrees + minutes/60 + seconds/3600

So a photo tagged 45° 26' 13.2" N, 12° 20' 4.5" E resolves to 45.437000, 12.334583 — a specific spot in Venice. Anyone with the file can do this in seconds.

Who strips it, who doesn’t

Here’s the part most people get wrong. The big social platforms strip EXIF on upload:

But plenty of common channels preserve it:

Notice the pattern: anything that treats your photo as a file may keep the metadata. Anything that recompresses it for a feed usually strips it. Do not assume a service removes EXIF. Check the downloaded copy.

Selling something on a classifieds site with photos taken at home? If the site doesn’t strip EXIF, your listing includes your address.

How to check what a photo leaks

Don’t guess — look. You can inspect EXIF entirely in the browser, without uploading the photo anywhere. I built an EXIF viewer that does exactly this: it reads the file locally with the FileReader API, parses the JPEG segments, and shows every tag, including GPS coordinates plotted on a map. The image never leaves your computer.

If you’re curious how that works technically: the browser reads the file into an ArrayBuffer, finds the APP1 marker in the JPEG bytes, and walks the TIFF directory structure inside it. I wrote about the FileReader object and the Blob object if you want to build something similar — it’s a nice exercise in reading binary data in JavaScript.

How to strip it

On iOS, the fastest option is built in: in the share sheet, tap Options at the top and turn off Location before sending.

To remove metadata from files you already have, you have a few options:

One caveat on the canvas method: re-encoding a JPEG loses a little quality. For photos going on the web that’s irrelevant. For archival originals, keep the original and strip a copy.

My advice

You don’t need to be paranoid about this. GPS in photos is genuinely useful — it’s how your photo library builds those maps and memories.

The rule I follow: metadata is fine on photos that stay in my library, and gets stripped from photos that leave it as files. Before sending a photo by email, posting it on my own site, or attaching it anywhere that isn’t a big social platform, I check it. It takes ten seconds, and it’s the difference between sharing a photo and sharing your home address.

Tagged: Tools · All topics
~~~

Related posts about tools: