MetaPurge

How to verify metadata removal

A tool saying "clean" is a claim. A second parser reading the same file and finding nothing is evidence. Here are the checks that turn one into the other.

By Rajat Malik Updated 9 min read

Verification is a different job from removal. The remover knows what it intended to delete. A verifier knows nothing and has to be convinced. When both are the same program, the second step inherits the first step's assumptions — including any tag it never modelled, any segment it copied through, and any format variant it parsed leniently.

This is not an argument against using one tool. It is an argument for checking the output with something that was written by different people, on a different day, from a different reading of the specification.

Why a clean dashboard is weak

A dashboard summarises. It shows the tags its parser recognised and the categories its author expected. If a file carries a vendor-specific maker-note serial, or an XMP packet in a segment the parser skipped, the summary can still say clean because the summary was never looking.

There is a second failure mode: the file that was checked is not always the file that was saved. A browser download, a re-upload or a "save as" step can pass through an editor that adds its own metadata back. Checking the bytes you are about to publish, not the bytes in the preview pane, is part of the job.

Re-parse with a second tool

Take the stripped file and open it in a different metadata reader. A viewer's properties dialogue is a start, but a tag dump is better, because it lists what is present rather than what the designer thought to display.

What you are looking for is not "no metadata". A clean JPEG usually still has a little: the JFIF header, an orientation tag if the camera wrote one, an ICC profile. What you are looking for is the absence of the categories that identify a person or a device.

Check the tags that matter

Go through the categories rather than trusting a single count. Location first, then device, then author, then time, then software history.

CheckWhat it provesWhat it does not prove
No GPSLatitude, GPSLongitude, GPSAltitude The standard location block is absent or empty. That no other block records a place, e.g. an XMP location field.
No BodySerialNumber, LensSerialNumber, OwnerName The standard device and owner fields were removed. That maker notes contain a vendor serial under another name.
No Artist, Copyright, XMP creator Attribution fields are gone. That a thumbnail or attachment does not repeat them.
Payload hash unchanged The pixels were copied, not re-encoded. Anything at all about metadata.

Compare the pixel payload

Comparing whole-file hashes before and after is a mistake: stripping metadata changes the file, so the hashes will differ even when the image is intact. The useful comparison is narrower. Hash only the region that holds the image data, and compare that.

For a JPEG, the compressed scan data sits between the first SOS marker and EOI. For a PNG, concatenate the contents of the IDAT chunks. For a WebP, the VP8 or VP8L chunk payload; for a GIF, the image data blocks. For TIFF, the strip or tile offsets.

If those bytes hash identically before and after, the compressed image data was copied rather than regenerated. In a PNG, identical IDAT bytes mean identical pixels. In a JPEG it means the same compressed data survived, which is the strongest guarantee a lossy format allows without decoding and re-encoding. If the hash differs, the file was re-encoded — which is a quality loss, not necessarily a privacy failure, but it is not what you asked for.

Two implementations agreeing beats one implementation reporting The point of a second parser is independence. If MetaPurge removes the tags and an unrelated tool also finds nothing, the result rests on two different readings of the same bytes. If only the remover finds nothing, the result rests on one.

exiftool as a second opinion

ExifTool is a separate, open-source command-line program by Phil Harvey. It is not bundled with MetaPurge and is not required to use it; you install it yourself, and on Windows that usually means downloading the standalone executable and putting it on your PATH.

Run it against the stripped file. -a shows duplicate tags, -G1 prints the group each tag belongs to, and the file name goes last:

exiftool -a -G1 file.jpg

Read the output the way a stranger would. Anything in the [EXIF], [XMP], [IPTC] or [MakerNotes] groups deserves a look. A clean result is usually a short list: [File] entries for name, size and type, [JFIF] for the JPEG header, [ICC_Profile] if a profile was kept.

To narrow it, ask for specific groups and skip the rest:

exiftool -a -G1 -EXIF:all -XMP:all -IPTC:all -MakerNotes:all file.jpg

If the output includes GPS tags, serial numbers, an owner name or an artist field, the file is not clean regardless of what any interface said. If the output is empty in those groups, the second reading agrees with the first.

Putting the checks together

A practical routine: strip the file, re-parse it, confirm the identifying groups are empty, confirm the payload hash matches the original, and confirm the image still opens and displays upright. That last check matters because removing Orientation is a common over-strip, and a sideways photo is a sign the pipeline took too much.

Record what you did if the file matters — the commands, the hashes and the date. Verification that cannot be repeated is just another claim. For the tag inventory itself, see what EXIF metadata is; for the fields most often missed, camera serial numbers. The same discipline applies to documents, where the properties dialogue is even less trustworthy, as covered in metadata in documents.

Strip, then check the result

Drop an image in. MetaPurge lists every tag, rewrites the file without touching a pixel, and re-scans the output before you save it.

Open the metadata remover

Rajat Malik Frontend architect and the author of MetaPurge. Builds browser tools that keep files on the device, and writes about the parts of the web that leak by default. rajatmalik.dev