How to Extract Metadata from Photoshop PSD Files
PSD files store far more metadata than JPEGs or PNGs. Beyond standard XMP and IPTC fields, they contain layer names, blend modes, color profiles, smart object references, and Photoshop-specific resource blocks. This guide covers how to extract all of it using ExifTool, Python, and automated extraction workflows.
What Metadata Does a PSD File Actually Contain?
PSD files are chunked binary containers with five major sections: a file header, color mode data, an image resources block, a layer and mask information block, and pixel data. Metadata lives scattered across most of these sections, which is why extracting it requires different tools for different layers of the file.
The file header stores the basics: image dimensions, bit depth (8, 16, or 32 bits per channel), number of channels, and color mode (RGB, CMYK, Grayscale, Lab, Duotone, Indexed, Multichannel, or Bitmap). These are not optional fields. Every PSD has them.
The image resources block is where Adobe stores most of the structured metadata. Each resource is tagged with a type identifier (8BIM) and a numeric resource ID. Key resources include:
- Resource 0x0404 (IPTC-NAA): The IPTC Information Interchange Model record, containing fields like caption, keywords, byline, copyright notice, city, and country. Photoshop adopted a subset of the IIM standard back in the early 1990s and still writes it for backward compatibility.
- Resource 0x0424 (XMP): The full XMP packet in XML format. XMP wraps and extends IPTC and EXIF data into a single, namespace-based schema. Photoshop writes Dublin Core, IPTC Core, IPTC Extension, Photoshop-specific, and EXIF namespaces here.
- Resource 0x040F (ICC Profile): The embedded color profile, which defines how colors map to a standard color space. This is critical for print workflows where a mismatch between the working profile and output profile causes color shifts.
- Resource 0x03ED (Resolution): Horizontal and vertical resolution in pixels per inch or pixels per centimeter, plus display units.
- Resource 0x040C (Thumbnail): A JFIF thumbnail for preview display, stored as a 28-byte header followed by JPEG data.
- Resource 0x0421 (Version Info): File version, whether the file has real merged data, the writer name, and reader name.
The layer and mask information block holds per-layer metadata: layer names, visibility flags, blend modes, opacity values, bounding rectangles, and layer section markers (which identify layer groups). Smart object layers carry additional data including the linked file's UUID, original filename, and transformation matrix.
EXIF data in PSD files works differently than in JPEGs. Cameras write EXIF directly into JPEG headers, but Photoshop stores EXIF fields inside the XMP packet. If you open a camera JPEG in Photoshop and save as PSD, the original EXIF data (shutter speed, aperture, ISO, GPS coordinates) migrates into XMP. The raw EXIF block may or may not be preserved depending on the Photoshop version and save settings. Design teams handing off PSD files often rely on Fast.io's workspaces for collaboration and AI-powered metadata extraction across their asset library.
Extract PSD Metadata with ExifTool
ExifTool, created by Phil Harvey, reads metadata from over 400 file formats. It parses PSD image resource blocks, XMP packets, IPTC records, and some layer information in a single command.
Installing ExifTool
macOS (Homebrew):
brew install exiftool
Ubuntu/Debian:
sudo apt install libimage-exiftool-perl
Windows: Download the standalone executable from exiftool.org and add it to your system PATH.
Reading All PSD Metadata
Run ExifTool against a PSD file to dump every readable tag:
exiftool design-mockup.psd
This outputs file type, MIME type, image dimensions, bit depth, color mode, resolution, XMP fields (title, description, creator, keywords, create date, modify date), IPTC fields (caption, byline, copyright, keywords, city, country), ICC profile name, and Photoshop-specific resources like slice information and print scale.
Filtering by Metadata Group
PSD metadata comes from multiple namespaces. Use the -G1 flag to see which group each tag belongs to:
exiftool -G1 design-mockup.psd
This prefixes each tag with its source group: [XMP-dc] for Dublin Core, [XMP-photoshop] for Photoshop-specific XMP, [IPTC] for IIM fields, [Photoshop] for image resource blocks, [ICC_Profile] for color management data.
To extract only XMP metadata:
exiftool -xmp:all design-mockup.psd
To extract only IPTC metadata:
exiftool -iptc:all design-mockup.psd
To read the ICC profile information:
exiftool -icc_profile:all design-mockup.psd
Extracting Layer Names
ExifTool can read layer information from PSD files using the verbose flag:
exiftool -v3 design-mockup.psd | grep "LayerName"
For a structured list of layer count, names, and blend modes:
exiftool -Photoshop:LayerCount -Photoshop:LayerNames design-mockup.psd
Machine-Readable Output
For scripting and automation, export to JSON:
exiftool -json design-mockup.psd > metadata.json
Or CSV for spreadsheet workflows:
exiftool -csv *.psd > psd-metadata.csv
This batch command processes every PSD in the current directory and writes one row per file, which is useful when auditing metadata across hundreds of design assets.
Read PSD Metadata with Python
The psd-tools library parses PSD files at the binary level, giving you programmatic access to layer trees, resource blocks, and image data that ExifTool cannot reach.
Installation
pip install psd-tools
For image compositing support (exporting layers as PNGs), install with the optional dependency:
pip install psd-tools[composite]
Reading File-Level Metadata
from psd_tools import PSDImage
psd = PSDImage.open('design-mockup.psd')
print(f"Dimensions: {psd.width} x {psd.height}")
print(f"Channels: {psd.channels}")
print(f"Bit depth: {psd.depth}")
print(f"Color mode: {psd.color_mode}")
print(f"Layer count: {len(list(psd.descendants()))}")
Extracting the Layer Tree
PSD files organize layers in a tree structure where groups (folders) contain child layers. psd-tools exposes this hierarchy directly:
from psd_tools import PSDImage
psd = PSDImage.open('design-mockup.psd')
def print_layers(layers, indent=0):
for layer in layers:
prefix = " " * indent
kind = layer.kind
visible = "visible" if layer.visible else "hidden"
print(f"{prefix}{layer.name} ({kind}, {visible}, "
f"opacity={layer.opacity})")
if layer.is_group():
print_layers(layer, indent + 1)
print_layers(psd)
This outputs every layer with its name, type (pixel, group, shape, type, smartobject), visibility state, and opacity value. For a complex design file, this can reveal dozens of layers organized into nested groups.
Reading Image Resource Blocks
To access the raw image resources (the same blocks ExifTool reads), use the low-level API:
from psd_tools import PSDImage
psd = PSDImage.open('design-mockup.psd')
for resource in psd.image_resources:
print(f"ID: {resource.resource_id}, "
f"Name: {resource.name}, "
f"Size: {len(resource.data)} bytes")
This lists every image resource block with its numeric ID, name string, and data size. You can match resource IDs against the Adobe specification to identify XMP packets (1060), ICC profiles (1039), IPTC records (1028), resolution info (1005), and thumbnails (1036).
Combining psd-tools with an XMP Parser
psd-tools reads the binary structure but does not parse XMP XML. For full XMP extraction, pair it with the python-xmp-toolkit or defusedxml library:
from psd_tools import PSDImage
from xml.etree import ElementTree
psd = PSDImage.open('design-mockup.psd')
for resource in psd.image_resources:
if resource.resource_id == 1060: # XMP resource
xmp_xml = resource.data.decode('utf-8')
root = ElementTree.fromstring(xmp_xml)
print(ElementTree.tostring(root, encoding='unicode'))
This extracts the raw XMP packet and parses it as XML, giving you access to every namespace and property in the metadata.
Manage and Extract PSD Metadata Across Your Design Library
Upload PSD files to Fast.io, extract structured metadata with Metadata Views, and keep your design assets organized and searchable. 50 GB free storage, no credit card required.
PSD-Specific Metadata That Most Guides Miss
Most metadata extraction guides focus on EXIF and IPTC because those standards originated with photography. PSD files contain several metadata categories that are unique to the Photoshop workflow and rarely documented outside Adobe's own specification.
Color Profile Data
The ICC profile embedded in a PSD file defines the color space the document was created in. Common profiles include sRGB IEC61966-2.1, Adobe RGB (1998), ProPhoto RGB, and various CMYK profiles tied to specific print conditions like US Web Coated (SWOP) v2. Extracting and checking this profile is essential before sending files to print or converting between color modes. A PSD saved in Adobe RGB will look desaturated on a screen calibrated to sRGB unless the viewer performs a profile conversion.
To extract just the ICC profile with ExifTool:
exiftool -icc_profile -b design-mockup.psd > profile.icc
This writes the raw ICC profile to a file, which you can then inspect with tools like ICC Profile Inspector or load into other applications.
Smart Object References
When a PSD contains smart object layers, each one stores a reference to the original linked or embedded file. This includes a unique ID (UUID), the original filename, the file type, and the transformation matrix applied to the smart object within the canvas. For linked smart objects, the reference includes the file path on the creator's system.
This metadata matters for asset management. If you receive a PSD with broken smart object links, extracting these references tells you which source files are missing and what they were originally named.
Layer Composition Metadata
Beyond names and visibility, each layer carries metadata about its composition: blend mode (Normal, Multiply, Screen, Overlay, and roughly two dozen others), fill opacity (distinct from layer opacity), layer effects (drop shadow, stroke, inner glow), and layer comp associations. Layer comps themselves are stored as a separate image resource block and record which layers are visible, their positions, and their applied styles for each comp state.
Photoshop History Log
If enabled in Photoshop preferences, the history log records every editing operation performed on the file. This metadata can include detailed session information: when the file was opened, what tools were used, what adjustments were applied, and when it was saved. For forensic analysis or audit trails, the history log can reconstruct the full editing timeline.
Document-Level XMP Properties
Photoshop writes several XMP properties that go beyond standard Dublin Core fields. These include photoshop:ColorMode, photoshop:ICCProfile, photoshop:DocumentAncestors (a list of document IDs showing the lineage of the file through save-as and duplicate operations), and photoshop:History (a condensed version of the editing history). The DocumentAncestors field is especially useful for tracking which template or source file a design originated from.
How to Remove Metadata from PSD Files Before Sharing
Sharing a PSD with a client or uploading it to a public repository can expose information you did not intend to share: your name, editing history, GPS coordinates from source photos, file paths from smart object links, and software version details.
Strip All Metadata with ExifTool
The most thorough approach removes every metadata field except the ICC profile (which you usually want to preserve for color accuracy):
exiftool -all= -icc_profile:all= design-mockup.psd
Wait. That command removes the ICC profile too. To keep it:
exiftool -all= --icc_profile:all design-mockup.psd
The double dash before icc_profile tells ExifTool to exclude that group from the removal operation. The original file gets backed up as design-mockup.psd_original unless you add -overwrite_original.
Selective Metadata Removal
Sometimes you want to strip personal data while keeping copyright and keyword fields intact:
exiftool -gps:all= -xmp:DocumentAncestors= -photoshop:History= design-mockup.psd
This removes GPS coordinates, the document ancestry chain, and the Photoshop history log while leaving everything else untouched.
Batch Removal Across a Directory
For cleaning metadata from an entire folder of PSD files before a handoff:
exiftool -all= --icc_profile:all -overwrite_original *.psd
This processes every PSD in the current directory, strips all metadata except ICC profiles, and overwrites the originals without creating backup files.
Photoshop's Native Options
Within Photoshop, you can use File > Export As to create a flattened copy with metadata stripped. However, this only works for rasterized export formats (JPEG, PNG, SVG). If you need to share the layered PSD itself without metadata, ExifTool is the more practical option.
Before sharing any design file externally, run a quick metadata audit:
exiftool -a -G1 design-mockup.psd | grep -i "gps\|author\|creator\|history\|ancestor"
This scans for the most commonly sensitive fields so you can verify what is still present.
Automate PSD Metadata Extraction at Scale
Extracting metadata from one PSD file is straightforward. Doing it across hundreds or thousands of design assets, and keeping the results queryable, is a different problem.
Batch Extraction with ExifTool
ExifTool natively handles directories:
exiftool -r -json -ext psd /path/to/assets/ > all-metadata.json
The -r flag processes subdirectories recursively, -ext psd limits processing to PSD files only, and -json outputs structured data. For large asset libraries, this produces a single JSON file where each entry corresponds to one PSD with all its extracted metadata fields.
Python Script for Layer Audits
Combining psd-tools with ExifTool gives you both layer-level and file-level metadata in one pass:
import subprocess
import json
from psd_tools import PSDImage
from pathlib import Path
def extract_psd_metadata(psd_path):
result = subprocess.run(
['exiftool', '-json', str(psd_path)],
capture_output=True, text=True
)
file_meta = json.loads(result.stdout)[0]
psd = PSDImage.open(str(psd_path))
layers = []
for layer in psd.descendants():
layers.append({
'name': layer.name,
'kind': str(layer.kind),
'visible': layer.visible,
'opacity': layer.opacity,
'blend_mode': str(layer.blend_mode),
})
file_meta['layers'] = layers
return file_meta
assets = Path('/path/to/assets')
all_metadata = []
for psd_file in assets.rglob('*.psd'):
all_metadata.append(extract_psd_metadata(psd_file))
with open('psd-audit.json', 'w') as f:
json.dump(all_metadata, f, indent=2)
This script produces a JSON file where each PSD has both its standard metadata (XMP, IPTC, ICC profile) and a full layer tree audit.
Structured Extraction with Fast.io Metadata Views
For teams managing large PSD libraries, Fast.io's Metadata Views let you turn uploaded files into a queryable database without writing code. You describe the fields you want extracted in plain English, and AI designs a typed schema, matches files in the workspace, and populates a sortable, filterable spreadsheet.
For PSD files specifically, you could define columns like "color profile name," "layer count," "primary subject," and "copyright holder." Metadata Views support PDFs, images, Word docs, spreadsheets, and presentations, so the same extraction schema can work across mixed asset libraries. New columns can be added without reprocessing existing files.
Agents can also trigger extraction programmatically through Fast.io's MCP server, which is useful for building automated pipelines where design files are uploaded, metadata is extracted, and the results are queried or routed to downstream workflows.
The free agent plan includes 50 GB of storage and 5,000 credits per month with no credit card required, which is enough to process a substantial design asset library.
Frequently Asked Questions
How do I view metadata in a PSD file?
The fast method is ExifTool on the command line. Run `exiftool yourfile.psd` to see all readable metadata including XMP, IPTC, EXIF, ICC profile, resolution, and Photoshop-specific resource blocks. For a graphical option, open the file in Photoshop and go to File > File Info, which shows a tabbed interface with Description, IPTC, Camera Data, and Advanced panels. Adobe Bridge also displays metadata in its sidebar without opening the full application.
What metadata does a Photoshop file contain?
PSD files contain metadata across multiple standards and proprietary formats. At the file level, you get XMP (Dublin Core, IPTC Core, Photoshop namespace), IPTC-IIM records, EXIF data (migrated from source photos), ICC color profiles, resolution information, and thumbnail previews. At the layer level, each layer stores a name, blend mode, opacity, visibility flag, bounding rectangle, and type identifier. Smart object layers add linked file references with UUIDs and original filenames. If the Photoshop history log is enabled, the file also records a detailed editing timeline.
Can ExifTool read PSD metadata?
Yes. ExifTool has full read and write support for PSD files. It reads XMP, IPTC, EXIF (via XMP), Photoshop image resource blocks (resolution, slices, version info, thumbnail), ICC profiles, and basic layer information like layer count and names. Use `exiftool -G1 yourfile.psd` to see each tag with its source group, or `exiftool -json yourfile.psd` for machine-readable output. ExifTool can also write and remove metadata from PSD files, making it useful for both extraction and cleanup workflows.
How to remove metadata from PSD files before sharing?
Use ExifTool with the command `exiftool -all= --icc_profile:all yourfile.psd` to strip all metadata while preserving the ICC color profile. The double dash before icc_profile excludes it from removal. For selective cleanup, target specific fields like GPS data or history logs with `exiftool -gps:all= -photoshop:History= yourfile.psd`. Always audit the file afterward with `exiftool -a -G1 yourfile.psd` to confirm sensitive fields are gone. Within Photoshop, File > Export As strips metadata but only works for flattened raster exports, not layered PSD files.
What is the difference between XMP and IPTC metadata in PSD files?
IPTC-IIM is the older standard, dating back to 1991, and stores a fixed set of fields like caption, keywords, byline, and copyright in binary format. XMP, introduced by Adobe in 2001, is an XML-based format that wraps IPTC fields (via the IPTC Core schema) and extends them with additional namespaces for camera data, document ancestry, color mode, and custom properties. In PSD files, both coexist as separate image resource blocks. Photoshop synchronizes them when saving, but editing one outside Photoshop can cause them to diverge. ExifTool uses the IPTCDigest field to detect and flag these sync conflicts.
Can I extract layer names from a PSD without opening Photoshop?
Yes, using either ExifTool or the Python psd-tools library. With ExifTool, run `exiftool -Photoshop:LayerNames yourfile.psd` for a simple list, or use `-v3` for verbose layer details. With psd-tools, call `PSDImage.open('yourfile.psd')` and iterate over `psd.descendants()` to access each layer's name, type, visibility, opacity, and blend mode. psd-tools also exposes the full layer group hierarchy, which ExifTool does not.
Related Resources
Manage and Extract PSD Metadata Across Your Design Library
Upload PSD files to Fast.io, extract structured metadata with Metadata Views, and keep your design assets organized and searchable. 50 GB free storage, no credit card required.