← Photo guides

Where Is EXIF Data Stored in a Photo? (JPEG, PNG, HEIC)

Where does EXIF actually live inside a photo file? The APP1 header, the IFD tree, byte offsets, and how JPEG, HEIC, PNG, TIFF, and WebP each store it.

Quick answer: EXIF is stored inside the image file itself, not in a separate sidecar file. In a JPEG it lives in the APP1 marker segment, a header block that starts with the bytes 0xFFE1 near the start of the file, with the tags arranged inside as a TIFF/IFD tree (IFD0, an Exif sub-IFD, and a GPS IFD). In HEIC the same tags sit in the container's metadata boxes; in PNG they can live in an eXIf chunk; TIFF stores them natively. Because the data is embedded, it travels with the photo whenever you copy or send it. Drop any photo into our EXIF Viewer to see what's in there; nothing uploads.

People often assume metadata lives in a hidden database on their phone, or in a small file next to the photo. It doesn't. The "when, where, and how" is written directly into the bytes of the image file, in a reserved region near the front. This guide explains where that region is and what happens when you edit or share the photo.

The short version: it's in the file, near the top

Open any JPEG straight from a camera and look at the first few hundred bytes. After the start-of-image marker (0xFFD8), one of the first things you hit is the APP1 marker segment, which holds the entire EXIF block. The compressed pixels come after it. So a typical camera JPEG runs: 0xFFD8 start marker, the 0xFFE1 APP1 marker holding EXIF, optional headers (APP2 ICC profile, APP13 IPTC, XMP), the pixel data, then the 0xFFD9 end marker. Because EXIF sits in a header near the top, separate from the pixels, a clean EXIF edit doesn't re-compress the image; the tool only rewrites the header region.

The IFD tree: IFD0, Exif sub-IFD, GPS IFD

The APP1 segment opens with 0xFFE1, a two-byte length, and the identifier Exif\0\0. Right after that, the payload begins with a tiny TIFF header: EXIF is, internally, a small TIFF file embedded inside the JPEG. That header declares the byte order (II little-endian or MM big-endian) and an offset to the first directory of tags.

From there, the tags are organized as a tree of IFDs (Image File Directories), not one flat list. Each has a job:

  • IFD0 (the "0th" or "TIFF" directory): camera and image-level fields like Make, Model, Software, Orientation, and Copyright. It also holds two pointer tags leading to the sub-directories below.
  • Exif sub-IFD: capture-time technical data. DateTimeOriginal, exposure settings, lens, ISO, color space.
  • GPS IFD: latitude, longitude, altitude, and GPS-derived timestamps, present only when a location was recorded.
  • IFD1 (the "1st" directory): an embedded thumbnail the camera generated.

A reader walks the tree: start at the TIFF header, jump to IFD0, follow the Exif pointer for capture settings, follow the GPS pointer for location. Our EXIF Viewer does exactly this and lays each directory out in its own table; the EXIF tag reference is the full dictionary of each field. Values that fit in four bytes sit inline in the tag entry; larger ones, like a GPS coordinate, are stored elsewhere in the segment, with the entry holding a byte offset to them.

How other formats store the same tags

The EXIF tags are largely the same across formats. What differs is the container the tags get tucked into.

  • JPEG / JPG: the APP1 marker segment described above.
  • TIFF: stores EXIF natively. A TIFF file is a structure of IFDs, so EXIF isn't bolted on, it's part of the base format. JPEG's EXIF is a borrowed copy of this TIFF layout.
  • HEIC: the iPhone default since iOS 11. Its HEIF container is built from nested "boxes," and the EXIF tags live in an item-metadata box rather than a JPEG-style marker. Same tags, different shelving.
  • PNG: can carry EXIF in a dedicated eXIf chunk; simpler tools sometimes use tEXt or iTXt text chunks instead. Many web-exported PNGs carry none at all.
  • WebP: stores EXIF in an EXIF chunk inside its RIFF container.

The tag reference covers the per-format editing caveats in detail.

Why "embedded" matters: the metadata travels with the file

Because EXIF lives inside the file, it follows the photo everywhere the file goes. Copy the JPEG to a USB stick, attach it to an email, or drop it in a shared folder, and the GPS coordinates and capture time come along. This is exactly why metadata is so useful for evidence and so risky for privacy: the proof, and the leak, are baked in.

It also explains why removing EXIF is not a one-line delete. The tags are woven into the file's header structure, so stripping them means rewriting the file without that region. Our EXIF Remover does this in your browser.

What happens when you edit, screenshot, or upload

Because EXIF is part of the file, what survives depends on whether the file gets re-encoded:

  • Copy, move, rename: the bytes are unchanged, so EXIF is preserved.
  • Crop, rotate, light edits: most editors keep the block and just update the dimension and orientation tags. Some rewrite it; check afterward with the viewer.
  • Screenshot: a screenshot is a brand-new image with its own minimal EXIF and none of the original's camera or GPS data. It's effectively a metadata wipe.
  • Upload to social platforms: Instagram, Facebook, X, and WhatsApp strip EXIF on upload by re-encoding. File-sharing tools like email, Dropbox, and AirDrop keep it.

For the bigger picture of what EXIF records and why people check it, see what is EXIF data.

FAQ

Is EXIF stored in a separate file next to the photo? No, it's embedded inside the image file itself. (Some pro RAW workflows use .xmp sidecars, but standard EXIF in a JPEG, HEIC, PNG, or TIFF lives inside the image.)

What's the difference between the APP1 block and the IFDs? APP1 is the JPEG slot that holds the EXIF. The IFDs (IFD0, Exif sub-IFD, GPS IFD) are the directory tree inside that slot.

Bottom line

EXIF isn't kept in a hidden app database or a sidecar file. It's embedded in the image: in a JPEG that means the APP1 marker segment near the top, structured as a TIFF/IFD tree (IFD0, Exif sub-IFD, GPS IFD). HEIC, PNG, WebP, and TIFF store the same tags in their own containers. Because it's baked in, the metadata travels with every copy.

To see where your photo's metadata lives: EXIF Viewer. To strip it before sharing: EXIF Remover. For the meaning of every tag: EXIF tag reference. All in your browser, nothing uploads.

Try the tools

Stamp a photo right now in your browser, or get the iOS app for live capture with GPS and atomic time.

Download on theApp Store
Open the web tool →EXIF viewer →
Where Is EXIF Data Stored in a Photo? (JPEG, PNG, HEIC) | TimeStamp Camera