Remove Photoshop metadata (XMP, DocumentAncestors)

Photoshop files carry an XMP block that grows forever and can outweigh the artwork. Here is what it is, three ways to remove it, and a tool that does it in your browser.

Updated · Free · No upload · Keeps every layer

Inside every PSD there is an XMP packet, a block of XML that stores authorship, colour settings, history and provenance. One field in that packet, photoshop:DocumentAncestors, is different from the rest: it is append-only. Photoshop adds an entry each time content is placed or pasted from another document and never removes one. Inside a bloated PSD the packet looks like this:

<photoshop:DocumentAncestors>
  <rdf:Bag>
    <rdf:li>adobe:docid:photoshop:1a2b3c4d-…</rdf:li>
    <rdf:li>adobe:docid:photoshop:5e6f7a8b-…</rdf:li>
    <rdf:li>xmp.did:9c0d1e2f-…</rdf:li>
    … tens of thousands more …
  </rdf:Bag>
</photoshop:DocumentAncestors>

None of it is needed to render the image or keep the file editable. No Adobe feature reads it back. It exists for legacy provenance tracking and accumulates indefinitely. Because each embedded smart object carries its own XMP packet, a document with dozens of smart objects stores the list dozens of times.

Drop your PSD here or click to choose · .psd / .psb

Three ways to remove it

Method Needs Photoshop Cleans smart objects Speed on a 1 GB file Batch
This tool (browser, WebAssembly) No Yes, recursively Seconds One at a time; CLI version for folders
Adobe ExtendScript / Bridge script Yes No Minutes, must open and resave Yes via Bridge
ExifTool -XMP-photoshop:DocumentAncestors= No No Slow, rewrites the whole file Yes

The Adobe script is the answer you will find most often on Adobe’s community forums. It calls XMPMeta.deleteProperty(XMPConst.NS_PHOTOSHOP, "DocumentAncestors") on the open document and saves. It is fine for a handful of simple files. It does not touch the XMP inside embedded smart objects, which is where most of the bytes were in our test file, and it needs a Photoshop licence on the machine that runs it.

What this tool does

  • Strips the ancestors field and its RDF wrappers from the document’s XMP packet
  • Descends into every embedded smart object and strips the same field there
  • Preserves all other XMP fields, image resources, layers and pixel data
  • Recalculates resource and section lengths so the file stays valid
  • Keeps the file fully compatible with Photoshop, Affinity Photo, GIMP and other PSD readers
  • Output is byte-deterministic: same input, same output

How processing works

Local execution

  • Pure WebAssembly, no server backend
  • About 20 KB WASM payload, loads instantly
  • Runs in a Web Worker so the page never blocks
  • Streams the file section by section; memory use is about the file size

Determinism

  • Identical input always yields identical output
  • Safe for asset pipelines and reproducible builds
  • No randomness, timestamps, or system-dependent fields injected
  • Running it twice changes nothing the second time

A privacy side effect

The ancestors list is also a leak. Each entry is a document ID, and IDs from a studio’s internal templates end up in every file derived from them. Sending a client a PSD with the list intact tells them which other projects shared its lineage. Stripping the field before delivery removes that trail along with the bytes.

Drop a PSD above to clean its metadata.

Real numbers: before and after

The first row is a file we measured with this exact engine. It took 1.4 seconds on a laptop. The other rows are cases reported by Photoshop users on Adobe’s forums after removing the same metadata field.

File Before After Saved
Game art, 1920×1080, RGB 8-bit, many smart objects 902 MB 254 MB 71.8%
Retouched photo passed between editors (Adobe Community) 65 MB 110 KB 99.8%
Reused PSD template, images placed repeatedly (Adobe Community) 100 MB 7 MB 93%

Your result depends entirely on how much ancestor history the file carries. A PSD created in one sitting and saved once may shrink by only a few kilobytes. A file that has been a template for two years can lose most of its size.

Step by step

  1. Open the tool. Go to psd.imtool.app in a desktop browser. No install, no account.
  2. Drop the PSD or PSB. The file is read locally in your browser. It is never uploaded.
  3. Wait for the strip to finish. The engine rewrites the XMP packet of the document and of every embedded smart object without the ancestors list, and recalculates section lengths.
  4. Download the cleaned file. Check the before and after sizes and download. Open it in Photoshop to confirm layers are intact.

FAQ

Which exact XMP fields are removed?

photoshop:DocumentAncestors and the surrounding rdf:Bag/rdf:li wrappers, in the main document and in every embedded smart object. Other XMP fields (creator, copyright, colour profile metadata, camera EXIF) are left alone.

Does it remove EXIF, IPTC or the ICC profile?

No. This is deliberately narrow. Camera data, copyright and colour profiles stay so the file behaves the same in colour-managed workflows and DAM systems.

Is the output deterministic?

Yes. Given the same input file, the tool produces byte-identical output. Useful for reproducible builds and asset pipelines.

Can I automate this for many files?

The web tool processes one file at a time. The engine is also published as an open-source command-line utility, psd_ockham, which processes folders and integrates into build scripts.

Does this break Photoshop’s own version history features?

No. Version history is a Creative Cloud feature stored separately. DocumentAncestors is a legacy provenance field unrelated to it.

What about JPEG/PNG metadata?

This tool is PSD/PSB-specific. For JPEG/PNG metadata, look at exiftool or jpegoptim. Note that Photoshop also writes DocumentAncestors into exported JPEGs and TIFFs, and exiftool can strip it there.