What is an XMP file? Sidecar files and XMP metadata explained
An XMP file is a small text file that a photo editor saves next to a picture, with the same name and the ending .xmp. It holds what the editor knows about that picture: your edits, ratings, keywords, captions and often your name. The same kind of data also travels inside the JPEGs you export. To see the XMP metadata one of your photos carries, drop it on MetadataLab's metadata viewer, and use the photo and EXIF remover to take it out before you share the file.
7 min readUpdated by the MetadataLab team
Do it now with the Metadata viewerSee what a file says about you. Nothing is changed. Free, in your browser. Your file is not uploaded.
What XMP means
XMP stands for Extensible Metadata Platform. Adobe describes it as a file labeling technology that lets you embed metadata into files, and it has been an ISO standard (ISO 16684-1) since 2012.
In practice XMP is text. It is written in XML, with labels you can read: a creator, a rating, a list of keywords, a set of slider values. Because it is text and the format is open, editors from different companies can read each other's XMP, at least for the common fields.
XMP shows up in two places. It can sit inside a file, such as a JPEG, a PDF or an MP4. Or it can be a file of its own, and that is the .xmp file people find in their photo folders.
Why an XMP sidecar file appears next to your photos
A camera RAW file is in the camera maker's own format, and editors avoid writing into it. So the editor puts its notes in a second file beside the first one. DSC_0412.NEF gets a companion called DSC_0412.xmp. That companion is the XMP sidecar.
Adobe's Lightroom Classic manual puts it this way: for camera raw files in a proprietary format, XMP is not written into the original files, and the metadata is stored in a separate sidecar file. Camera Raw and Bridge do the same.
Other editors use the idea too. Capture One can keep XMP sidecar files in sync with its own metadata, and darktable creates an XMP file automatically the first time you import an image.
Apple Photos writes one in a single case, when you tick a box on export. That box has its own page here: Export IPTC as XMP.
What is inside an XMP file
Open one in any text editor and you can read it. The usual contents are the rating and color label, keywords, the caption and title, the creator and copyright line, and the develop settings: exposure, white balance, crop, and every other slider the editor has.
Nothing in an XMP file is a picture. It is a recipe that the editor applies to the RAW file each time it shows you the photo. That is why the files are only a few kilobytes.
It can also hold things about you. A creator name, an email address and a phone number go in if you filled in a contact preset once and forgot about it. Place names go in if you typed a city or used a map module.
Can I delete XMP files?
It depends on where your editor keeps its work, so find that out before you delete anything.
In Camera Raw and Bridge the sidecar is where the settings are stored. Adobe's Camera Raw manual says the settings go in a separate file in the same folder as the raw file, with the same base name and an .xmp extension. Delete that file and the photo opens as it came out of the camera.
Lightroom Classic works from a catalog, and writes XMP files when you ask it to or when you have turned on automatic writing in the catalog settings. In that setup the sidecars are a second copy. The careful test is to move the .xmp files to another folder, open the photos, and see whether your edits are still there. If they are, the sidecars were a copy.
Never delete the sidecars of photos you are about to hand to someone else to edit. They would get the RAW files with none of your work.
How to view and remove XMP metadata
To see what a photo carries, drop it on the metadata viewer. It reads the XMP inside photos, videos and PDFs and lists what it finds in plain words. A standalone .xmp sidecar is plain text, so any text editor opens it.
To take the XMP out of a file before you send it, use the photo and EXIF remover. It removes XMP, EXIF and IPTC together and copies the picture data untouched. For a PDF, the PDF metadata remover removes every XMP block when it rebuilds the document.
Export settings in an editor can trim the metadata, and a copyright-only setting still leaves your name in the file. Check one exported photo in the viewer to see what your settings keep.
XMP, EXIF and IPTC: which is which
EXIF is what the camera writes: device, settings, time, place. IPTC is a set of fields for describing a picture, such as caption, credit and keywords, defined by the news industry. XMP is a container that can carry both of those and anything else an app wants to add.
The IPTC standard today is stored in two ways, an older binary block and XMP. The IPTC Photo Metadata Standard describes both. So when a program says "IPTC as XMP", it means IPTC fields, written in the XMP format.