Every time you take a photo with your phone, the exact GPS coordinates are embedded in the image file. When you share that photo online — on forums, marketplaces, or messaging apps — anyone who downloads it can see exactly where you were standing. Here’s how to remove it in 3 seconds.
Quick Fix: Strip All Metadata
- Open PixelStrip
- Drop your photo on the page
- See the metadata report (GPS coordinates highlighted in red)
- Click “Strip All Metadata & Download”
The downloaded photo looks identical but contains zero hidden data. No GPS, no camera model, no timestamps.
What Metadata Is Actually in Your Photos?
EXIF metadata was designed for photographers to track camera settings. But smartphones added fields that reveal far more than you’d expect:
- GPS Latitude/Longitude — accurate to within 3 meters on modern phones
- Device Model — “iPhone 16 Pro” or “Samsung Galaxy S25” — narrows down who took the photo
- Date & Time — the exact second the photo was captured
- Camera Serial Number — a unique identifier that links photos from the same device
- Thumbnail — a smaller version that may contain content you cropped out
Which Platforms Strip Metadata Automatically?
Do strip metadata: Facebook, Instagram, Twitter/X, WhatsApp (when sent as photo, not file)
Don’t strip metadata: Email, Telegram (file mode), Discord, Forums, Craigslist, eBay, Dropbox, Google Drive shared links
If you’re sharing via any channel that doesn’t strip metadata, do it yourself first.
👉 Strip your photos with PixelStrip — no upload, no account, 100% in your browser.
Command-Line GPS Removal With ExifTool
ExifTool is the Swiss Army knife of metadata manipulation. It reads and writes EXIF, IPTC, XMP, and dozens of other metadata formats across virtually every image type. For GPS removal specifically, it offers surgical precision — you can strip location data while preserving camera settings, copyright info, and other tags you want to keep.
# View all GPS-related tags in a photo
exiftool -gps:all photo.jpg
# View GPS as a Google Maps link
exiftool -n -p "https://maps.google.com/?q=$GPSLatitude,$GPSLongitude" photo.jpg
# Remove ONLY GPS tags (keep everything else)
exiftool -gps:all= photo.jpg
# Remove GPS from all JPEGs in a folder
exiftool -gps:all= -overwrite_original *.jpg
# Remove GPS + create backup of originals
exiftool -gps:all= -o stripped/ *.jpg
# Nuclear option: remove ALL metadata
exiftool -all= photo.jpg
# Verify GPS is gone
exiftool -gps:all photo.jpg
# Should output: (no output = no GPS tags)
The key flag is -gps:all= (with the equals sign and no value). This tells ExifTool to set all GPS-related tags to empty, effectively deleting them. The -overwrite_original flag skips creating backup files (ExifTool normally saves photo.jpg_original as a safety net). For batch processing, the wildcard *.jpg handles every JPEG in the current directory.
For automated workflows, here’s a shell script that watches a folder and strips GPS from any new images:
#!/bin/bash
# auto_strip_gps.sh - Watch a folder and strip GPS from new images
WATCH_DIR="${1:-.}"
PROCESSED_LOG="$WATCH_DIR/.stripped_files"
touch "$PROCESSED_LOG"
echo "Watching $WATCH_DIR for new images..."
while true; do
find "$WATCH_DIR" -maxdepth 1 -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" \) | while read -r file; do
if ! grep -qF "$file" "$PROCESSED_LOG" 2>/dev/null; then
echo "Stripping GPS from: $file"
exiftool -gps:all= -overwrite_original "$file" 2>/dev/null
echo "$file" >> "$PROCESSED_LOG"
fi
done
sleep 5
done
And here’s a Python wrapper that gives you more control — logging, error handling, and the ability to selectively preserve certain tags:
import subprocess
import os
import json
def get_gps_data(filepath):
result = subprocess.run(
["exiftool", "-json", "-gps:all", filepath],
capture_output=True, text=True
)
if result.returncode != 0:
return None
data = json.loads(result.stdout)
return data[0] if data else None
def strip_gps(filepath, keep_backup=False):
cmd = ["exiftool", "-gps:all="]
if not keep_backup:
cmd.append("-overwrite_original")
cmd.append(filepath)
result = subprocess.run(cmd, capture_output=True, text=True)
return result.returncode == 0
def batch_strip_gps(folder, extensions=None):
if extensions is None:
extensions = {".jpg", ".jpeg", ".tiff", ".png"}
results = {"stripped": [], "skipped": [], "errors": []}
for fname in os.listdir(folder):
ext = os.path.splitext(fname)[1].lower()
if ext not in extensions:
continue
fpath = os.path.join(folder, fname)
gps = get_gps_data(fpath)
if gps and any(k.startswith("GPS") for k in gps):
if strip_gps(fpath):
results["stripped"].append(fname)
else:
results["errors"].append(fname)
else:
results["skipped"].append(fname)
return results
# Usage:
# results = batch_strip_gps("/path/to/photos")
# print(f"Stripped: {len(results['stripped'])}")
# print(f"Skipped (no GPS): {len(results['skipped'])}")
The Python wrapper adds intelligence that the raw command lacks. It checks whether GPS data actually exists before attempting removal (avoiding unnecessary file writes), tracks which files were processed, and separates results into stripped/skipped/error categories. This is useful when processing large photo libraries where most images may already be clean.
Building a Browser-Based GPS Stripper
Command-line tools are powerful but require installation. For a zero-install solution, you can build a browser-based GPS stripper that processes photos entirely client-side. The challenge: you need to parse the JPEG binary format, find the GPS IFD (Image File Directory) entries, and nullify them — all without corrupting the rest of the file.
// Parse JPEG to find and nullify GPS data
// GPS lives in the EXIF APP1 segment (marker 0xFFE1)
async function removeGPSFromJPEG(file) {
const buffer = await file.arrayBuffer();
const bytes = new Uint8Array(buffer);
// Verify JPEG signature
if (bytes[0] !== 0xFF || bytes[1] !== 0xD8) {
throw new Error("Not a valid JPEG file");
}
// Find APP1 (EXIF) segment
let offset = 2;
while (offset < bytes.length - 1) {
if (bytes[offset] !== 0xFF) break;
const marker = bytes[offset + 1];
// APP1 = 0xE1
if (marker === 0xE1) {
const segLen = (bytes[offset+2] << 8) | bytes[offset+3];
// Check for EXIF header: "Exif\0\0"
const header = String.fromCharCode(
bytes[offset+4], bytes[offset+5],
bytes[offset+6], bytes[offset+7]
);
if (header === "Exif") {
nullifyGPSInSegment(bytes, offset + 10, segLen - 8);
}
}
// SOS marker = start of image data, stop parsing
if (marker === 0xDA) break;
// Skip to next segment
const len = (bytes[offset+2] << 8) | bytes[offset+3];
offset += 2 + len;
}
return new Blob([bytes], { type: "image/jpeg" });
}
function nullifyGPSInSegment(bytes, tiffStart, length) {
// Read byte order: "II" (Intel/little-endian)
// or "MM" (Motorola/big-endian)
const isLittleEndian = (bytes[tiffStart] === 0x49);
function readUint16(pos) {
return isLittleEndian
? bytes[pos] | (bytes[pos+1] << 8)
: (bytes[pos] << 8) | bytes[pos+1];
}
function readUint32(pos) {
return isLittleEndian
? bytes[pos] | (bytes[pos+1]<<8) | (bytes[pos+2]<<16) | (bytes[pos+3]<<24)
: (bytes[pos]<<24) | (bytes[pos+1]<<16) | (bytes[pos+2]<<8) | bytes[pos+3];
}
// Parse IFD0 to find GPS IFD pointer (tag 0x8825)
const ifd0Offset = tiffStart + readUint32(tiffStart + 4);
const entryCount = readUint16(ifd0Offset);
for (let i = 0; i < entryCount; i++) {
const entryPos = ifd0Offset + 2 + (i * 12);
const tagId = readUint16(entryPos);
// Tag 0x8825 = GPS IFD pointer
if (tagId === 0x8825) {
const gpsOffset = tiffStart + readUint32(entryPos + 8);
const gpsEntries = readUint16(gpsOffset);
// Zero out all GPS IFD entries
for (let j = 0; j < gpsEntries * 12 + 2; j++) {
if (gpsOffset + j < bytes.length) {
bytes[gpsOffset + j] = 0;
}
}
// Zero the GPS IFD pointer itself
for (let j = 0; j < 12; j++) {
bytes[entryPos + j] = 0;
}
break;
}
}
}
// Usage with File API:
// const input = document.getElementById("fileInput");
// input.addEventListener("change", async (e) => {
// const file = e.target.files[0];
// const cleanBlob = await removeGPSFromJPEG(file);
// const url = URL.createObjectURL(cleanBlob);
// const a = document.createElement("a");
// a.href = url;
// a.download = "nogps_" + file.name;
// a.click();
// });
This approach is more surgical than the Canvas re-encoding method. Instead of re-creating the entire image (which causes quality loss from re-compression), it modifies the binary directly — zeroing out only the GPS IFD entries while leaving everything else intact. The image pixels, camera settings, and file structure remain untouched. The tradeoff is complexity: you need to handle both byte orderings (Intel and Motorola), navigate the TIFF IFD chain, and correctly parse variable-length tag values.
The nullifyGPSInSegment function locates the GPS IFD by scanning IFD0 for tag 0x8825 (the GPS Info IFD Pointer). Once found, it zeros out every byte in the GPS IFD block, including the pointer itself. This is a safe operation because EXIF parsers skip zero-valued entries, and the rest of the file structure remains valid. PixelStrip uses a more refined version of this technique that also handles XMP GPS data and IPTC location fields, which can duplicate GPS information in different metadata formats.
My Photo Privacy Workflow
I set up an automated pipeline: every photo I export goes through ExifTool before it hits any cloud service. The workflow is simple but effective — a folder action on my Mac watches my “Export” directory and runs exiftool -gps:all= -overwrite_original on any new JPEG or PNG that appears. By the time I drag a photo into an email, a chat app, or a forum post, the GPS data is already gone.
The tradeoff between convenience and privacy is real. GPS-tagged photos are genuinely useful — they power the “Places” album in your photo library, enable location-based search, and add context to travel memories. I don’t strip GPS from photos that stay in my private library. The rule is: GPS stays on photos I keep, GPS gets removed from photos I share. That boundary is the entire workflow in one sentence.
Here’s what I learned about platform-by-platform metadata handling after testing each one with a GPS-tagged test image:
- Facebook/Instagram — Strips all EXIF on upload. Your photos are safe, but Facebook stores the GPS data server-side for their own use before removing it from the public file.
- Twitter/X — Strips EXIF. Clean since 2014 after multiple privacy incidents.
- WhatsApp — Strips EXIF when sent as a photo. But if you send as a “document” (file attachment), all metadata is preserved. This catches people off guard.
- Telegram — Same as WhatsApp: photo mode strips, file mode preserves.
- Discord — Does NOT strip EXIF. Every image uploaded to Discord retains full metadata including GPS. This is a major blind spot for the gaming community.
- Email — No stripping whatsoever. Attachments are sent as-is.
- Google Drive / Dropbox shared links — No stripping. The recipient downloads the original file with all metadata intact.
- Forums (Reddit, Discourse, phpBB) — Depends on configuration. Reddit strips EXIF, but most self-hosted forums do not.
- eBay / Craigslist / Marketplace — Inconsistent. Some strip, some don’t. Always strip before uploading to any marketplace.
The takeaway: if you’re not sure whether a platform strips metadata, assume it doesn’t. It takes 3 seconds to run a photo through PixelStrip or ExifTool. That’s a trivial cost compared to the risk of leaking your home coordinates to a stranger on the internet. I treat GPS stripping the same way I treat locking my front door — it’s not paranoia, it’s just basic hygiene.
Related Reading
- What Is EXIF Data? (And Why You Should Remove It) — understand what metadata is hiding in your photos
- PixelStrip: One-Click EXIF and GPS Removal — the browser-based tool that strips all metadata instantly
- How to Compress Images Without Losing Quality — after removing metadata, shrink file size too
📚 Related Articles
Get Weekly Security & DevOps Insights
Join 500+ engineers getting actionable tutorials on Kubernetes security, homelab builds, and trading automation. No spam, unsubscribe anytime.
Delivered every Tuesday. Read by engineers at Google, AWS, and startups.
Frequently Asked Questions
What is How to Remove GPS Location from Photos Before Sharing Online about?
Every time you take a photo with your phone, the exact GPS coordinates are embedded in the image file. When you share that photo online — on forums, marketplaces, or messaging apps — anyone who downlo
Who should read this article about How to Remove GPS Location from Photos Before Sharing Online?
Anyone interested in learning about How to Remove GPS Location from Photos Before Sharing Online and related topics will find this article useful.
What are the key takeaways from How to Remove GPS Location from Photos Before Sharing Online?
Here’s how to remove it in 3 seconds. Quick Fix: Strip All Metadata Open PixelStrip Drop your photo on the page See the metadata report (GPS coordinates highlighted in red) Click “Strip All Metadata &
References
- CIPA EXIF Standard (DC-008) — Official Exchangeable Image File Format specification maintained by CIPA.
- Canvas API — MDN — Browser API used for client-side image processing and metadata removal.
- EFF — Photos May Reveal More Than You Think — Electronic Frontier Foundation article on privacy risks of photo metadata.
- ExifTool by Phil Harvey — Industry-standard open-source tool for reading and writing image metadata.
📧 Get weekly insights on security, trading, and tech. No spam, unsubscribe anytime.

Leave a Reply