Images & photos · Image Metadata Privacy Tool
JPEG Markers Explained: APP0, APP1, APP2, APP13 and Where Metadata Lives
· Background
exif image-privacy file-formats
A JPEG is a sequence of marker segments, and metadata lives in the application segments near the start: JFIF in APP0, EXIF and XMP in APP1, ICC profiles in APP2, Photoshop resources and IPTC in APP13. This map shows what each carries and what a stripper should and should not remove.
The stripped JPEG that still had a caption — why removing 'the EXIF' can leave IPTC or XMP behind
A JPEG can lose APP1 Exif and still carry a caption in APP13 Photoshop/IPTC, an XMP packet in another APP1 segment or a COM comment. “Remove EXIF” is therefore narrower than “remove the metadata segments this tool recognises.” ToolAcre walks the segment sequence and classifies each block instead of stopping after the first familiar label.
How a JPEG is laid out — SOI, a run of marker segments, the frame and scan data, and EOI
The file begins with the start-of-image marker, continues through marker segments and reaches start-of-scan before entropy-coded picture data. Each ordinary segment has a marker and length, allowing the walker to skip or copy it as one bounded range. Once scan data begins, the cleaner appends the complete remainder verbatim rather than interpreting encoded pixels.
APP0 and APP1 — the JFIF header, the Exif block, and the second APP1 flavour that carries an XMP packet
APP0 JFIF is retained because it describes pixel density. APP1 may be classified as Exif when its payload begins with the Exif identifier or XMP when it carries the Adobe namespace signature; both metadata forms are removed. Other unrecognised APPn segments are treated conservatively as metadata unless a rendering purpose is explicitly known.
APP2, APP13 and APP14 — ICC colour profiles, Photoshop image resources with embedded IPTC IIM, and Adobe encoding flags
APP2 ICC is kept because dropping a colour profile can shift colours. APP13 carrying Photoshop resources is removed with its IPTC data. APP14 Adobe is kept because its colour-transform marker can be necessary for correct CMYK or YCCK decoding. These decisions explain why “delete every APP marker” would be a broken cleaner.
COM segments and bounded segment lengths
COM carries comments and is removed. The workbook specified a 64 KB limit, but the repository code establishes only that the two-byte segment length is validated, must be at least two and must not run beyond the file. This section stays with those verified bounds instead of introducing a derived maximum not stated by the project sources.
Which segments affect display — why ICC profiles and Adobe flags change how the picture looks while EXIF, XMP and IPTC do not
Display-affecting markers are retained and reported with reasons, while descriptive or unrecognised application metadata is dropped. The distinction protects visual output without claiming that retained blocks are privacy-empty: the support matrix notes that colour profiles can themselves carry a description string, which is a documented residual gap.
What the JPEG walker does not interpret
The walker does not decode progressive or arithmetic image data because it stops at start-of-scan and copies the rest. It parses only APP1 Exif fields for display, not XMP or IPTC contents. A corrupt EXIF block is skipped during reading but its segment can still be removed, keeping inspection failure from becoming cleaning failure.
Takeaway: know which segments are metadata — the Image Metadata Privacy Tool removes the metadata segments and leaves the image data untouched
Know which segments are metadata and which are required for rendering. A correct cleaned JPEG drops Exif, XMP, Photoshop/IPTC, comments and unsupported APP metadata while preserving JFIF, ICC, Adobe colour information and every compressed scan byte. Review the explicit removed and kept lists instead of judging success from file size alone.