DEV Community

Cover image for How to Remove GPS and EXIF Data From Photos Before You Share Them (Free, No Upload)
Aniruddha Adak
Aniruddha Adak Subscriber

Posted on

How to Remove GPS and EXIF Data From Photos Before You Share Them (Free, No Upload)

Every photo from your phone carries a small hidden label. It is called EXIF metadata, and it can hold the date and time, the phone model, the lens settings and, very often, the exact GPS spot where you stood when you pressed the button.

Most big sites strip that data when you post. Many do not. Email attachments, forum uploads, marketplace listings and files you send over a chat app as "document" can all keep it. If you sell a used bike from your front porch and attach the original photo, a stranger can read where your porch is.

This guide shows how to check what a photo says about you and how to remove it, using only your own browser. No upload, no sign-up.

What EXIF data can reveal

Open any phone photo in a metadata viewer and you will usually see:

  • Date and time the photo was taken
  • Phone brand and model
  • GPS latitude and longitude (if location was on for the camera)
  • Camera settings like ISO and exposure
  • The software that last saved the file

The GPS part is the one that matters for privacy. Coordinates from a phone are often accurate to a few meters.

Why not use a random online EXIF remover

I get the irony. To protect a private photo, many sites ask you to upload that private photo to their server first. That means the file with your location inside it travels to a machine you know nothing about, and you hope it gets deleted.

A browser can do this job by itself. Reading EXIF and re-saving an image are small tasks. They do not need a server.

Step by step: strip EXIF in your browser

I use the EXIF Viewer and Remover in OpenFile, a free and open source toolkit I built. Every tool in it runs inside the tab.

  1. Open https://openfile-studio.vercel.app/image-metadata-remover
  2. Drop in one photo or a batch.
  3. Look at the metadata list first. You will see the fields found in the file, including GPS if there is any.
  4. Choose to remove it and download the clean copy.

Under the hood, the tool reads the metadata with a library called exifr so you can inspect it. Then it draws the image onto a canvas and saves it again. A file saved that way has no original metadata in it, because the canvas only holds pixels.

One thing to know: because the image is re-encoded, the file is saved again as an image, so the quality setting matters a little. For a normal photo you will not see a difference.

Check your result

Open the cleaned file in the same viewer again. The GPS fields should be gone. You can also check on your computer: on Windows, right click the file, open Properties and then Details. On a Mac, open the file in Preview and look under Tools, then Show Inspector.

Can I prove nothing was uploaded

Yes, and you do not have to trust me. Open your browser's developer tools, go to the Network tab, and run a photo through. You will see the page assets load once, and no request carries your image. You can also turn off Wi-Fi after the page loads. The tool keeps working, because OpenFile can be installed as an app that runs offline.

A few habits that help

  • Turn off location for the camera app if you rarely need geotags
  • Strip metadata before you sell or give away something from home
  • Do the same for photos of documents, since they can carry a location too
  • Keep the original untouched and share only the cleaned copy

Questions people ask

Does removing EXIF change how the photo looks? No. Only the hidden data is dropped.

Does this work for HEIC photos from an iPhone? Convert them to JPG first with the HEIC converter in the same toolkit, then strip the data.

Is it free? Yes. OpenFile is MIT licensed, with no watermark and no limit on files.

If you want to look at the code, it is here: https://github.com/aniruddhaadak80/OpenFile

I made the toolkit because I was tired of upload-only sites. If you find a photo format it does not handle well, tell me in the comments and I will look at it.

Top comments (0)