Metadata Editor

EXIF EditorEXIF ReaderRemove MetadataGuidesGlossaryAbout

Resolution and DPI: the number that only matters on paper

At a glance

ExifTool tag namesEXIF:XResolution, EXIF:YResolution, EXIF:ResolutionUnit, JFIF:XResolution, JFIF:YResolution, JFIF:ResolutionUnit
Tag ID / location0x011A (XResolution), 0x011B (YResolution), 0x0128 (ResolutionUnit)
CategoryImage & file structure
Example value300 dpi (300/1, inches)
On metadata-editor.comShown in the EXIF reader, editable in the EXIF editor (JPEG, TIFF)

The 72 dpi in your photo's metadata means nothing on a screen. A monitor shows pixels and does not care how many were meant to fit in an inch. XResolution and YResolution only come into play when something converts pixels to a physical size: a print dialog, a layout program, a PDF export. A 3000-pixel-wide image tagged 300 dpi prints 10 inches wide by default; tagged 72 dpi, the same pixels default to 41.7 inches. Change the number and not a single pixel moves.

In EXIF the values live in IFD0. XResolution (0x011A) and YResolution (0x011B) are unsigned rationals, usually 72/1 or 300/1. ResolutionUnit (0x0128) is 2 for inches or 3 for centimeters; ExifTool also accepts 1 (none) and documents it as non-standard.

A JPEG often carries a second copy in its JFIF APP0 segment, and the two can contradict each other. ExifTool hides the duplicate unless you add -a:

$ exiftool -a -G1 -s -XResolution -ResolutionUnit print.jpg
[JFIF]          XResolution                     : 300
[IFD0]          XResolution                     : 72
[JFIF]          ResolutionUnit                  : inches
[IFD0]          ResolutionUnit                  : inches

The raw unit codes differ as well: with -n, JFIF says 1 for inches and EXIF says 2. Readers pick different sources. On that file, Pillow reported 300 dpi and ImageMagick's identify reported 72. Photoshop files can add a third copy in the ResolutionInfo resource (0x03ED) of the APP13 segment.

Our EXIF editor writes the IFD0 values for JPEG and TIFF. With ExifTool, leaving out the group updates both copies, while naming the group touches only that one:

exiftool -XResolution=300 -YResolution=300 print.jpg
exiftool -EXIF:XResolution=300 -EXIF:YResolution=300 print.jpg

On a test file with JFIF at 96 and IFD0 at 72, the first command set both to 300. The second changes IFD0 only and leaves the JFIF value as it was. If you only care about screens, skip all of this. If you send files to a printer or a page layout, set the value you want explicitly in both places, and check the pixel dimensions first, since they decide the real print quality. The JFIF side is covered in JFIF version, the JPEG format page shows where both segments sit, and the editing guide walks through other tools.

Related fields

Where Resolution (DPI) comes up

Other Metadata Tools