What DPI is, and what this tool changes
DPI, dots per inch, also written PPI for pixels per inch, is a number stored inside an image file that says how many of its pixels should go into one inch when the image is printed or placed in a layout. A photo 3,000 pixels wide prints 10 inches wide at 300 DPI and about 41.7 inches wide at 72 DPI. The pixels are the same in both cases; only the instruction for the printed size differs.
That is why this tool does not open or re-save the picture. It finds the fields in the file that hold the resolution and writes the new value into them. The compressed picture data is copied unchanged, byte for byte, so there is no quality loss and the file size stays the same, or grows by a few bytes when the file had no resolution field and one is added. It also works as a batch: drop several files and they all get the same new value. The TIFF 6.0 specification makes the same point about its resolution fields: a program does not have to display or print the image at the size they imply, and can use the value as it wishes.
Where the DPI is stored
| Format | Field | How the value is stored |
|---|---|---|
| JPG | JFIF header (APP0) | A unit (0 no unit, only the pixel aspect ratio; 1 dots per inch; 2 dots per cm) and X and Y density as 2-byte numbers, so at most 65,535 |
| JPG | EXIF (APP1) | XResolution and YResolution as fractions, ResolutionUnit 2 for inches or 3 for centimeters |
| PNG | pHYs chunk | Pixels per unit for X and Y as 4-byte numbers, unit 1 for the meter or 0 for no unit (aspect ratio only) |
| TIFF | Image file directory | XResolution, YResolution and ResolutionUnit (1 no unit, 2 inch, 3 centimeter) |
A JPG can have both a JFIF header and EXIF data, and photo editors often add more copies in XMP or Photoshop metadata. This tool sets the same value in every copy it finds, so all programs read the same DPI. When a JPG has no JFIF header and no EXIF resolution, the tool adds a small JFIF header with the new DPI right after the start of the file, the place the JFIF specification gives it. A PNG without a pHYs chunk gets one before its image data, where the PNG specification requires it.
PNG counts pixels per meter, not per inch. One inch is 0.0254 meters, so 300 DPI is stored as 300 / 0.0254 = 11,811 pixels per meter, rounded to a whole number. Read back, that is 299.9994 DPI, which the tool shows as 300.
The EXIF standard says 72 DPI shall be written when the resolution is unknown. So 72 DPI in a photo's EXIF data can simply mean that no real resolution was ever set; it says nothing about the quality of the photo.
Print size: pixels divided by DPI
The printed size in inches is the pixel width divided by the DPI, and the same for the height. Multiply inches by 2.54 for centimeters. The tool shows both sizes for every file, at the current DPI and at the new one.
| Pixels | At 72 DPI | At 150 DPI | At 300 DPI |
|---|---|---|---|
| 1,200 × 1,800 | 16.67 × 25 in | 8 × 12 in | 4 × 6 in |
| 2,400 × 3,000 | 33.33 × 41.67 in | 16 × 20 in | 8 × 10 in |
| 3,000 × 2,000 | 41.67 × 27.78 in | 20 × 13.33 in | 10 × 6.67 in |
| 4,032 × 3,024 | 56 × 42 in | 26.88 × 20.16 in | 13.44 × 10.08 in |
Worked example: a 3,000 × 2,000 pixel photo at 300 DPI is 3,000 / 300 = 10 inches by 2,000 / 300 = 6.67 inches, or 25.4 × 16.93 cm. Turn it the other way round to find the pixels you need: a print of 8 × 10 inches at 300 DPI needs 8 × 300 = 2,400 by 10 × 300 = 3,000 pixels.
When the DPI value matters
The DPI value matters where an image meets paper or a page layout. Programs that lay out pages for print can use it to decide how large an image appears when you place it, and some upload forms check the DPI value of a file before they accept it. In those cases, setting the right number saves you from resizing the image by hand in every document, or from a rejected upload.
What the DPI value cannot do is add detail. If a print at the size you need comes out below the DPI your print shop asks for, the image has too few pixels for that size. Choose a smaller print size, or start from a larger original. The image resizer changes the pixel size itself, which re-saves the picture.
WebP, GIF, HEIC and other formats
Only JPG, PNG and TIFF are changed here. The WebP container has a canvas width and height but no field for a physical resolution, and the GIF89a specification stores only a pixel aspect ratio. HEIC and AVIF are not supported by this tool. Convert such images first, for example with WebP to PNG, GIF to PNG or HEIC to JPG, then set the DPI of the result here.
How to change the DPI of an image
- 1Drop one or more JPG, PNG or TIFF files on the box, or tap it to choose them on your phone. Each file shows its pixel size and the DPI it has now.
- 2Pick 72, 96, 150, 300 or 600 DPI, or Custom to type any whole number. The print size at the new DPI updates right away.
- 3Download each image on its own, or all of them in one ZIP file. The new copies keep the original file names.
To see the other metadata in a photo, like the camera or the GPS location, use the EXIF viewer and remover.
Sources
- JPEG File Interchange Format, Version 1.02, Eric Hamilton, C-Cube Microsystems, 1992: APP0 marker right after SOI, units 0, 1 and 2, 2-byte Xdensity and Ydensity
- Portable Network Graphics (PNG) Specification, Third Edition, W3C: pHYs chunk (pixels per unit, unit 0 or 1 for the meter, before IDAT), eXIf chunk, chunk CRC
- CIPA DC-008-2019, Exif Version 2.32: XResolution, YResolution and ResolutionUnit, 72 DPI when the resolution is unknown
- TIFF Revision 6.0, Aldus, 1992: XResolution, YResolution and ResolutionUnit
- WebP Container Specification, Google: VP8X chunk fields
- GIF89a Specification: Logical Screen Descriptor and pixel aspect ratio
Related guides
- How to Compress a Photo Under 100 KB
- Passport Photo Size by Country: US, UK, Canada and More
- Paper Sizes: A4 vs Letter, the A Series and the US Sizes
Frequently asked questions
Does changing the DPI lower the image quality?
No. The tool does not open or redraw the picture. It only rewrites the few bytes that store the resolution (or adds one small header block when the file has none), and copies the compressed picture data unchanged. The pixels, the colors and the pixel size stay exactly as they were.
Will a higher DPI make my photo sharper?
No. The sharpness depends on the number of pixels, and changing the DPI does not add any. A higher DPI only makes the photo print smaller with the same pixels packed closer together, and a lower DPI makes it print larger. To get more pixels you would have to scale the image up, which adds no real detail.
Which DPI should I choose?
The one your printer, print shop or upload form asks for. The tool shows the print size at the new DPI for every file, in inches and centimeters, so you can see whether the picture comes out at the size you need. If the print size is too small at the DPI you need, the photo simply has too few pixels for that size.
Can I change the DPI of a WebP, GIF or HEIC image?
Not here. The WebP and GIF formats have no field for a print resolution, and HEIC and AVIF are not supported by this tool. Convert the image to JPG or PNG first, then set the DPI here. Keep in mind that each conversion of a photo to JPG re-encodes it once.
Are my images uploaded?
No. Your browser reads the files and writes the new copies on your own device. Nothing is sent to a server.
Why does my program still show the old DPI?
A file can store the resolution in several places, and a program may read a different one than you expect. This tool writes the new value into every place it finds: the JFIF header and EXIF data of a JPG, the pHYs chunk and EXIF data of a PNG, the resolution fields of a TIFF, and copies in XMP and Photoshop metadata. If a program still shows the old value, close the file there and open the new copy, which has the same name as the original.