JPEG vs PNG vs WebP: how each format stores metadata

All three formats can carry metadata, but they do it in structurally different ways. If you are trying to understand what a file might be leaking — or why a metadata tool handles one format differently from another — the differences matter. This is a practical overview, not a specification walkthrough.

JPEG

JPEG is the oldest of the three and has the richest metadata ecosystem, mostly because it has had thirty years to accumulate one.

A JPEG file is a sequence of segments, each introduced by a two-byte marker. Metadata lives in several of these segments:

A single JPEG can carry all four simultaneously, each with overlapping or contradictory information. A file exported from Lightroom, for instance, might have the camera's original EXIF, Lightroom's XMP sidecar merged in, and IPTC fields from a previous round of editing. Stripping metadata from a JPEG means removing all of these segments while leaving the compressed image data — the SOS (Start of Scan) segment and everything after it — untouched.

PNG

PNG uses a chunk-based structure. Every piece of data in a PNG is a named chunk with a length and a checksum. Metadata can appear in several chunk types:

In practice, PNG files carry less metadata than JPEGs. Most cameras do not shoot PNG, so the files that exist are usually exports from editing software or screenshots. Screenshots tend to carry only the software name and a timestamp. Edited photos exported as PNG may carry a full EXIF block in an eXIf chunk if the software supports it.

Stripping PNG metadata means removing the text chunks, the eXIf chunk, and the tIME chunk. The critical image chunks — IHDR, IDAT, IEND — are left alone.

WebP

WebP uses the RIFF container format — the same family as WAV and AVI. Data is organised into named chunks inside the RIFF wrapper:

WebP does not have an equivalent of IPTC or PNG's text chunks. Its metadata surface is smaller: just EXIF and XMP. Stripping it means removing those two chunks from the RIFF container.

Practical implications

JPEG is the most metadata-heavy format. If you are concerned about what a file reveals, JPEG is the one most likely to carry GPS data, serial numbers, and editing history. It is also the format that most metadata tools handle best, because it has been the primary target for thirty years.

PNG is usually lighter but not always safe. A PNG exported from Photoshop can carry a full EXIF block. A screenshot typically carries very little. Do not assume PNG means "no metadata" — check.

WebP falls in between. It supports EXIF and XMP but not IPTC. Android phones that save WebP files will embed GPS and camera data just as they would in a JPEG.

Conversion does not automatically strip metadata. Converting a JPEG to PNG or WebP may or may not preserve the metadata, depending on the tool. Some converters copy the EXIF block into the output format; others discard it silently. If metadata removal is your goal, strip it explicitly rather than relying on a format conversion to do it by accident.

MetaScrub's photo tool handles all three formats — JPEG, PNG, and WebP — parsing the format-specific structures described above and removing everything except the image data itself.


Remove metadata from any image format · What is EXIF data?