GoWin Tools
Tools
Metadata Cleaner

Metadata Cleaner · 5 min read

How to Remove Metadata from Photos Before Sharing Them Online

Stripping EXIF data protects your location, device identity, and timestamp from being exposed when you share images. Here is how to do it — and when it matters most.

Who Needs to Strip Photo Metadata?

Most people never think about metadata when sharing photos. But for specific groups, overlooking it can have serious consequences:

  • Journalists and their sources: A photo shared with an editor or published online can reveal where a source met the journalist, when, and on what device.
  • Activists and dissidents: GPS coordinates in a protest photo can identify participants or organise locations that authorities were not meant to know about.
  • Domestic abuse survivors: A photo shared online can reveal a new address to an abusive ex-partner, even when the person has taken other precautions to hide their location.
  • Security researchers: Photos taken during a security audit or penetration test can reveal the researcher's location and equipment.
  • Anyone selling items online: Photos taken at home contain GPS data that identifies the home address to anyone who downloads the image.

How Browser-Based Metadata Stripping Works

A browser-based metadata cleaner uses the HTML Canvas API to strip EXIF data without any file ever leaving your device. The process:

  1. Load the image into an <img> element in memory
  2. Draw the image pixels onto a <canvas> element — this renders only the pixel data, discarding all metadata
  3. Export the canvas as a new JPEG or PNG file using canvas.toBlob()

The exported file contains only pixel data and a minimal set of non-identifying image properties (dimensions, color space). All EXIF, IPTC, and XMP metadata is gone because it was never part of the canvas pixel representation.

This technique is sometimes called "canvas re-encoding" and is the same method used by privacy-focused messaging apps to sanitize images before transmission.

Alternative Tools for Stripping Metadata

ExifTool (command line)

ExifTool by Phil Harvey is the most comprehensive metadata tool available. It can read and write metadata in hundreds of file formats. To strip all metadata from an image:

exiftool -all= photo.jpg

This modifies the file in-place, preserving pixel data while removing all metadata tags.

ImageMagick (command line)

ImageMagick's convert command can strip metadata during file conversion:

convert -strip input.jpg output.jpg

Operating system tools

  • Windows: Right-click the image → Properties → Details tab → "Remove Properties and Personal Information" link at the bottom
  • macOS: Open in Preview → Tools → Inspector → GPS tab → "Remove Location Info" button
  • iOS: Photos app → Share → "Options" (above recipient list) → toggle off "Location"

What Remains After Stripping

A canvas-re-encoded image retains only its pixel data. Some minimal properties are added by the browser's JPEG encoder: image width and height, and sometimes a color profile (sRGB). These are non-identifying and standard.

One important caveat: steganography — data hidden within image pixels rather than in metadata — is a separate concern and is not addressed by metadata stripping. Steganographic data is embedded in the pixel values themselves and survives re-encoding. However, steganography requires deliberate embedding and is not a feature of standard cameras or phones.

What Platforms Strip Automatically

Major social platforms strip most EXIF data on upload, but the behaviour is inconsistent and subject to change:

  • Facebook, Instagram: Strip GPS and device metadata from publicly viewable images
  • Twitter/X: Strips EXIF from uploaded images
  • WhatsApp: Strips metadata from photos shared via the app
  • iMessage: Does not strip metadata by default when sending original-quality images
  • Email attachments: Metadata is fully preserved — whatever is in the file is what the recipient receives
  • Direct file sharing (Dropbox, Google Drive links): Metadata is preserved in the original file

The safest practice is to strip metadata before sharing, regardless of the platform — this ensures your privacy does not depend on another service's current policy.

References

  1. Freedom of the Press Foundation. (2024). Removing Metadata from Files — Digital Security for Journalists. freedom.press.
  2. Electronic Frontier Foundation. (2024). Surveillance Self-Defense: How to Remove Metadata from Files. ssd.eff.org.
  3. Harvey, P. (2024). ExifTool — Reading, Writing, and Editing Metadata. exiftool.org documentation.
  4. Committee to Protect Journalists. (2024). Digital Safety — Protecting Your Sources. CPJ Digital Safety Notes.