What EXIF actually is
EXIF is not a separate file bolted onto your picture. It is a block of key and value pairs inside the image file, in a format inherited from TIFF: a header declaring byte order, then a linked list of directories whose entries each carry a tag, a type, a count and a value or an offset. JPEG stores the block in an APP1 marker segment, PNG in an eXIf chunk, WebP in an EXIF chunk.
Two related formats travel with it. IPTC is the press and print record of who made an image and under what licence, carried in an APP13 Photoshop segment of 8BIM resources. XMP is Adobe's XML replacement, an RDF packet that restates EXIF and adds a creator and editing history. A file saved by a recent editor often carries all three.
The three directories that matter
IFD0 is the main directory: make, model, orientation, software, timestamps and two pointers. The first, 0x8769, leads to the Exif sub-IFD, which holds the capture data — exposure time, aperture, ISO, the original capture time and the lens model. The second, 0x8825, leads to the GPS sub-IFD. Its mere presence means the device recorded a position, or believed it had.
A third directory, reached by a pointer at the end of IFD0 rather than from inside it, is IFD1. It holds the embedded thumbnail: a second, usually smaller and usually uncropped copy of the photograph stored inside the same file. It is the one people forget, because they cropped the image they sent.
The tags worth reading
Most tags are harmless. The ones that matter fall into a short list:
- GPS coordinates — latitude, longitude, an altitude, often with their own timestamps. A position plus a time is the dangerous combination, because it describes not just where but when.
- Timestamps —
DateTimeandDateTimeOriginal, to the second and often with no time zone. - Camera make, model and lens. A fingerprint of the device rather than of you.
- Exposure data — shutter speed, aperture, ISO.
- Software — the writing application and its version number.
- Artist and copyright, plus the Windows
XPTitle,XPComment,XPAuthorandXPKeywordsfields — free text that often holds a real name. - The embedded thumbnail, described above.
Reading coordinates without a map
GPS position is not stored as a decimal number. Each coordinate lives in the GPS sub-IFD as three rationals — degrees, minutes, seconds — with reference tags holding N/S and E/W. An editor shows 51/1 30/1 264/10: 51 degrees, 30 minutes, 26.4 seconds north. Useless until converted.
It also reports how finely the coordinate resolves. Because seconds are a rational, the last digit shows how precise the fix was: whole seconds are worth about 31 metres, a tenth of a second about 3. Coarse coordinates leak less — whole minutes points at a neighbourhood, not a doorway.
Decode a GPS block into decimal degrees
Stays in this tabWhy stripping means re-encoding
You can remove metadata by rewriting the container in place: locate the APP1 segment, shorten it, fix its length field and write out the rest. That is lossless, but format-specific, and a wrong length produces a file that no longer opens.
Re-encoding sidesteps all of it. The file is decoded to pixels, the pixels are drawn to a canvas, and the canvas is encoded out with canvas.toBlob(). The output has never contained an EXIF block, because nothing wrote one, so every metadata container goes at once with no per-format special cases.
One catch catches people out. The orientation tag does not rotate pixels; it tells a viewer how to rotate them at display time. Delete it and a photo shot sideways appears sideways. The fix is to rotate the pixels before writing them out, which is what imageOrientation: "from-image" does at decode time. You cannot delete the instruction and keep depending on it.
Lossy, lossless, and generational loss
JPEG and WebP are lossy codecs. A photo already through one has discarded information no re-encode recovers, so re-encoding adds a second generation of artefacts: fine foliage, text inside a photograph, and smooth gradients such as a sky, which can band.
The quality slider sets how much more compression is applied. Around 90% is a sensible default; below about 70% the difference is easy to see on a large screen. WebP holds detail better than JPEG at the same size. PNG is lossless, at the cost of a much larger file.
So the choice is not about privacy but about whether you can afford a second generation. If you cannot, re-encode to PNG or to high-quality WebP and keep your original.
What stripping does not do
Metadata is bookkeeping, and bookkeeping is not identity. Stripping the EXIF block removes a channel an automated tool can read in milliseconds. It does nothing about what is visible in the frame: faces, plates caught in a mirror, house numbers, street signs, a skyline seen from a window.
This is not a redaction tool. Blurring a plate and removing metadata are different operations serving different purposes, and neither substitutes for the other. If the picture itself is the sensitive part, crop or blur it first, then strip.
A short habit for everyday sharing
Read before you strip. Ten seconds with a reader tells you whether the file carries coordinates or nothing, which decides whether this is a quick re-encode or a crop too.
Strip before you post. Files sent by email, direct link, chat attachment or cloud drive usually arrive exactly as they left. Large platforms usually re-encode uploads, which removes metadata as a side effect, but that is one company’s implementation detail.
Watch for the copies. Exporting, messaging and screenshotting each produce a different file with different metadata, and the one you share may not be the one you cleaned. A screenshot is a fresh PNG with almost nothing attached, which makes it a reasonable last step.
Keep your original. Stripping produces a new file, and nothing in a browser modifies the picture on your disk.
Common questions
Does removing EXIF remove GPS data?
Yes, if the removal is real. GPS lives in the Exif sub-IFD of a JPEG or the eXIf chunk of a PNG, and is discarded with everything else on re-encoding. It is worth reading first: one file can carry coordinates to several decimal places, an altitude and a UTC timestamp, which together are often enough to place a photo on a map and work out when.
What metadata does a phone photo contain?
Usually the manufacturer and model, the software version that wrote the file, the lens, the capture time to the second, an orientation flag, commonly a GPS position with altitude, and an embedded thumbnail. Many devices add Windows-style text tags such as Title, Author and Comment, which is where a real name often ends up.
How do I strip metadata from a JPEG, PNG or WebP before posting?
Add the file to a reader, check the report, then re-encode to the format you want and download the copy. On your own machine, exiftool with the -all= option or ImageMagick’s -strip flag does the same job. A screenshot is also worth considering: it is a new PNG with almost nothing attached.
Does removing EXIF make a photo anonymous?
No. It stops a program reading your coordinates out of the file. It does nothing about faces, plates, reflections, signage or a recognisable view, none of which are metadata. If the frame is what is sensitive, crop or blur it as a separate step.
Why does stripping sometimes make the photo look different?
Because stripping is done by re-encoding, and JPEG and WebP are lossy. Re-encoding an already compressed file adds a second generation of artefacts, worst in fine detail and smooth gradients. Keep quality high, or re-encode to PNG, which is lossless.
Does removing metadata reduce the file size?
Only slightly. Tags and the thumbnail are small compared with the image. A large difference comes from re-encoding: a lower quality setting can halve a photo, and a photograph re-encoded as PNG is far bigger than its JPEG. A tool worth using shows both sizes so you can tell which effect you are getting.
Sources and further reading
- ITU-T Recommendation T.872: Exchangeable image file format for digital still cameras (Exif)
- ExifTool: EXIF, GPS, IPTC and XMP tag names
- MDN: HTMLCanvasElement.toBlob()