Image DPI Changer
Drop a PNG or JPG, set the DPI you need, and download a copy whose pixel data is byte-for-byte identical — the change is metadata only, and nothing is uploaded.
- Free
- No account
- Runs in your browser
- Nothing uploaded
A whole number from 1 to 2400. The pixels are not touched — only the density recorded in the file's metadata changes.
Runs entirely in your browser — your input is never uploaded, logged, or stored.Privacy policy
What is Image DPI Changer?
DPI is not part of the picture. It is a number stored in the file's metadata that says how many image pixels the author intends to fit into one inch when the image is printed or placed in a page layout. A 3000-pixel-wide photo is always 3000 pixels wide; at 300 DPI it is meant to print 10 inches wide, and at 150 DPI it is meant to print 20 inches wide. Changing the number does not add or remove a single pixel.
That is exactly what this tool changes. It opens the file, finds the density record, rewrites it, and copies every other byte through untouched — the compressed image data is never decoded, re-encoded or re-compressed, so there is no quality loss of any kind. In a PNG the number lives in a `pHYs` chunk, stored as pixels per metre (the value is multiplied by 0.0254 to get DPI, because one inch is exactly 0.0254 m). In a JPG it lives in the JFIF APP0 segment, stored as a unit code plus an X and a Y density; a dots-per-centimetre value is multiplied by 2.54 to get DPI.
Because only metadata changes, the pixel data stays identical and the file size barely moves: a file that already records a density keeps its exact length, and a file that records none grows by 18 bytes (JPG) or 21 bytes (PNG) for the new record. Note that DPI cannot make a picture sharper. Asking a 500-pixel-wide image to be 300 DPI only tells a printer to reproduce it 1.67 inches wide — the detail is still 500 pixels. If you need the picture to be physically larger at the same DPI, you need more pixels, which is a resize (interpolation), not a DPI change.
Whether the new number is honoured depends entirely on the program reading the file. Browsers, social networks and most screen viewers ignore DPI completely — they draw by pixel dimensions. Print drivers, Adobe Photoshop and InDesign, GIMP, Microsoft Word and similar layout and print tools do read it, and that is where it matters: a photo for a 4 × 6 inch print, an image dropped into a report where the pixel dimensions would otherwise make it the wrong physical size, or a printer that refuses anything under 300 DPI. The tool writes the same number into both the X and Y density, so the aspect ratio is never distorted.
Two honest limits. First, this works on PNG and JPG only: WebP, GIF, HEIC, AVIF and TIFF put their density somewhere else, or not at all, and are not touched by this tool. Second, a JPG can also carry resolution tags inside a separate EXIF block; this tool rewrites the JFIF density, which is the block every reader understands, but it leaves any EXIF resolution tags as they were — a few programs read those first, so if your DPI appears unchanged in one specific application, that is the likely reason.
Everything happens in your browser: the file is read locally, changed in memory and handed back as a download. Nothing is uploaded, and no request carrying your image leaves the page.
1. The file's size is checked (50 MB) before it is read, and its leading bytes confirm it is really a PNG (89 50 4E 47 0D 0A 1A 0A) or a JPG (FF D8 FF). The name and MIME type are not trusted. 2. The existing density is read back. PNG: the `pHYs` chunk gives pixels per metre (unit specifier 1 = metre), so DPI = round(pixels-per-metre × 0.0254). JPG: the APP0 JFIF segment gives a unit code and an X density, so DPI = the value for unit 1 (dots per inch) or round(value × 2.54) for unit 2 (dots per centimetre). 3. The new value is written. PNG: the pixel count to store is round(dpi ÷ 0.0254) — 300 DPI is 11,811 pixels per metre — written into both the X and Y slots of a `pHYs` chunk, whose CRC32 is recomputed over its type and 9 data bytes. An existing `pHYs` chunk is overwritten in place (it is always 21 bytes on the wire); otherwise the new chunk is inserted directly after IHDR, where the spec places it. 4. JPG: an existing JFIF APP0 segment has its units byte set to 1 and its Xdensity and Ydensity fields set to the requested DPI; a file with no JFIF segment gets a fresh one (length 16, "JFIF\0", version 1.1, units 1, thumbnails 0) inserted directly after SOI, where JFIF requires it. 5. Every other byte — the entire compressed image, colour profiles, other metadata — is copied through unchanged, so the saved file's pixel data is byte-for-byte identical to the original's. The output is named like photo-300dpi.png or scan-300dpi.jpg.
| Format | Where the value lives | Who reads it | |
|---|---|---|---|
| PNG | pHYs chunk — X and Y pixels per metre, unit specifier 1 = metre | Print drivers, Photoshop, GIMP, InDesign. Ignored by web browsers. | |
| JPG (JFIF) | APP0 segment — unit code, Xdensity, Ydensity | The same print and layout programs. This is the record this tool changes. | |
| JPG (EXIF) | APP1 segment — XResolution, YResolution, ResolutionUnit | Windows, macOS Preview and many camera apps read it too; this tool leaves it as it was. |
Worked examples
- A PNG with no pHYs chunk (read as "Not set"), set to 300 DPI: the output is 21 bytes larger and its new pHYs chunk stores 11,811 pixels per metre, which reads back as 300 DPI.
- A JPG whose JFIF segment records units 1, Xdensity 72, Ydensity 72, set to 300 DPI: four bytes change — the two 16-bit density fields, Xdensity and Ydensity, each become 300 while the units byte stays 1 — the file length is unchanged, and every other byte is identical.
- A JPG whose JFIF segment records units 2 (dots per centimetre) with Xdensity 118 is read as round(118 × 2.54) = 300 DPI.
- A JPG with no JFIF segment at all, set to 600 DPI: an 18-byte APP0 segment is inserted after the SOI marker and the original bytes follow it unchanged.
- The range is 1 to 2400 DPI inclusive: 1, 300 and 2400 are accepted; 0, 2401 and 72.5 are refused with "DPI must be a whole number from 1 to 2400."
How to use Image DPI Changer
- Click "Choose a PNG or JPG image", drop the file on the box, or paste it — the file is read in your browser, not uploaded.
- Check the "Current DPI" readout: it shows the value the file already records, or "Not set" when it records none.
- Type the DPI you want, or tap a preset (72, 96, 150, 300, 600). 300 is the usual value for a photo print; 72–96 suits screens.
- Click "Change DPI", then download the result. The pixels are unchanged — only the density record is rewritten.
Common errors
- "DPI must be a whole number from 1 to 2400." — type a whole number in that range. 72.5, 0 and 2401 are all refused before the file is touched.
- "notes.pdf" is actually a PDF file, not PNG or JPG. The extension does not match the contents — use a PDF tool for this file." — this tool only changes the density recorded in PNG and JPG files.
- "logo.webp" is actually a WebP file, not PNG or JPG. The extension does not match the contents — use a WebP tool for this file." — WebP stores density differently and is not supported here; save it as PNG or JPG first if you need to change its DPI.
- "photo.png" is not a recognisable PNG or JPG file — its contents do not match any image or PDF format. It may be damaged, or a different kind of file renamed." — re-save or re-download the original.
- "That PNG's pHYs chunk is malformed — its length is not the 9 bytes the format requires — so its density cannot be replaced safely." — the PNG's density record is damaged, so the file is left alone rather than risk corrupting the image. Re-save the PNG from a working editor first, or change its DPI there.
- "empty.png" is empty (0 bytes). Choose the file again — it may not have finished downloading."
- "photo.jpg" is 62.40 MB, over the 50.00 MB limit for this tool. Everything runs in your browser's memory, so very large files can crash the tab." — compress or resize the file first; this tool does not need the file to be small, only the tab to survive it.
- The download still shows the old DPI in one particular program. — Many programs read a JPG's EXIF resolution tags instead of (or before) the JFIF record this tool rewrites. Browsers and social platforms ignore DPI entirely; check the value in a print or layout program, or in the PNG's chunk data.
FAQ
Does changing the DPI change the image's size in pixels?
No. The pixel grid is untouched — a 3000 × 2000 image stays 3000 × 2000. DPI only decides how large those pixels are meant to be drawn when printed: 3000 pixels at 300 DPI is 10 inches wide, and at 150 DPI it is 20 inches wide.
Does this re-compress or reduce the quality of my image?
No. The file is never decoded or re-encoded. Only the density record is rewritten, and the compressed image data (the PNG IDAT chunks or the JPEG scan) is copied through byte-for-byte. A file that already records a density keeps its exact length; a file with none grows by 18 bytes (JPG) or 21 bytes (PNG).
Why did nothing look different after I changed the DPI?
Because DPI is a printing instruction, not a pixel change. Browsers, social networks, phones and most image viewers ignore it and simply draw the pixels. The new value shows up when you place the image in a print or layout program (Photoshop, InDesign, Word, GIMP), in a print dialog, or when you inspect the file's metadata.
What is the difference between DPI and PPI?
Strictly, PPI (pixels per inch) describes an image's pixel density, while DPI (dots per inch) describes how many ink dots a printer lays down. Image files store a pixels-per-inch value, but everyone — including these file formats — calls it DPI, and that is the name this tool uses. The file's dimension stays 1 inch ÷ resolution for both.
Should I use 300 DPI for printing?
300 DPI is the common standard for a good photo print and for images placed in a document, and 150 DPI is a reasonable draft. But 300 DPI alone does not make a print sharp: a 600-pixel-wide photo at 300 DPI prints 2 inches wide. Check that the pixel dimensions are large enough for the physical size you want.
Can I change the DPI of a WebP, GIF, HEIC or TIFF file?
No — this tool only edits PNG and JPG. Those other formats either store density elsewhere or not at all, so they are refused with a message naming the format. Convert the file to PNG or JPG first if you need to set a DPI.
Does this change the resolution tags inside a JPG's EXIF data?
No. It rewrites the JFIF APP0 density, which is the block every reader understands, and leaves any EXIF XResolution / YResolution tags as they were. A few programs prefer the EXIF value, so if one application still shows the old number, that is why.
Is my image uploaded anywhere?
No. The file is read from your device, the density bytes are changed in memory, and the result is offered as a download. Nothing is sent to a server — you can watch the Network tab in your browser's developer tools and see no request carrying the image.
Related tools
- Image ResizerDrop images, choose a percentage, a width, a height or an exact pixel size, and download the resized copies — all processed on your device.
- PNG to JPG ConverterDrop PNG images, choose a JPG quality and a colour for transparent areas, and download smaller JPG files — converted on your device, nothing uploaded.
- Image CompressorDrop JPG, PNG or WebP images, set a quality or a target size in KB, and download smaller files — compressed on your device, never uploaded.
- Image ConverterDrop any common image — JPG, PNG, WebP, HEIC, AVIF, GIF, BMP, SVG or ICO — choose JPG, PNG, WebP or ICO, and download the converted files.
Prefer AllUtil on Google
One click adds AllUtil to your Google preferences. You'll see our tools highlighted with a Preferred badge in Search and AI answers.