All guides

Metadata inside JPEG, PNG and WebP: where each format keeps it

Metadata is not one label glued to the front of a picture. Each image format has its own way of packing extra information next to the pixels, and a cleaner needs to know those layouts to take the right parts out and leave the rest alone. Here is how the three formats handled by Remove Metadata organise it.

JPEG: marker segments

A JPEG file is a sequence of segments, each opening with a two-byte marker. The compressed picture follows the header segments, and metadata sits in the application segments among those headers:

  1. EXIF is stored in an APP1 segment. It holds camera and lens details, dates, settings, GPS coordinates and the preview thumbnail, which is itself a tiny JPEG.
  2. XMP usually occupies a second APP1 segment, written as text, and can repeat many of the same facts.
  3. IPTC captions, keywords and place names are kept in an APP13 segment.
  4. Comment segments can hold free text of any kind.

The ICC colour profile lives in APP2 segments. It is kept, together with the orientation tag, so the photo looks the same after cleaning.

PNG: named chunks

A PNG file starts with a fixed signature, followed by chunks that each carry a four-letter name. The picture itself is in IDAT chunks. Metadata turns up in text chunks (tEXt, zTXt and iTXt, the last of which often carries XMP), in an eXIf chunk holding EXIF data, and in a tIME chunk recording when the image was last modified. Colour chunks such as iCCP, sRGB and gAMA describe how the colours should be displayed, and they stay.

WebP: a RIFF container

WebP wraps everything in a RIFF container. A simple file contains just the picture chunk; an extended one opens with a VP8X header announcing optional chunks. EXIF and XMP each get a chunk of their own, while an ICCP chunk holds the colour profile and remains in place. Animated WebP files are not cleaned in this version.

Data after the end of the picture

Some files keep going after the picture has officially ended. The best-known case is the motion photo: the phone appends a short video clip behind the end marker of a JPEG, so ordinary viewers show the still while the phone’s own gallery plays the clip. Cleaning such a file means cutting off that tail, and Remove Metadata warns you beforehand with Only the still image will be kept.

Why HEIC and AVIF are not cleaned yet

HEIC and AVIF are built on a different, box-based container in which the picture and its metadata are separate items tied together by a table of offsets. Taking one item out means rewriting those references precisely, otherwise the file breaks. Remove Metadata does not clean these two formats in this version; if you open one, the page says it can’t be cleaned here yet. JPEG, PNG and WebP are the ones handled today.

Remove metadata in your browser → Remove Metadata