Resize an image to exact pixels, cm or KB

Pick a size or a preset. The page shows the math and writes the DPI into the file.

Your photos never leave this device. Resized files have metadata such as location removed. Change DPI only keeps the original file data.

    Preset sizes come from the official pages linked beside each one, checked on the date shown. Portals change their rules, so check the current notice before you submit.
    Resize by
    Dots per inch. Sets the print size; it does not change the pixels.
    Save as
    File size window (JPG, optional)
    The pixel size stays fixed; only the JPG quality is searched.

    Add one or more photos.

    How it works

    Pick a size in pixels, percent, longest side or cm/mm/inch, or choose a preset. Your browser draws each photo at the new size and saves it as JPG or PNG. Nothing is uploaded, and the page works offline once it has loaded.

    How we calculate it

    Open "Show your work" under any result to see these lines with that file's numbers. Only the lines that apply are shown.

    1. Original. Pixel size, file size, format, and the DPI already in the file (or "not set").
    2. New size. One line for the mode you used.
      • Pixels with keep aspect: height = new width × original height ÷ original width. Example: 1080 × 3000 ÷ 4000 = 810 px.
      • Percent: each side × percent. 4032 × 50% = 2016 px.
      • Longest side: scale = target ÷ longest side, applied to both sides. Photos already within the limit are not enlarged.
      • cm / mm / inch: px = mm ÷ 25.4 × DPI, rounded to the nearest pixel (1 in = 25.4 mm exactly, NIST SP 811). Example: 35 ÷ 25.4 × 300 = 413.39 → 413 px.
      • Minimum-size presets: scale = the larger of (min width ÷ width) and (min height ÷ height). They only enlarge, never crop.
    3. Fit. When the new shape differs from the photo. Crop removes equal strips from both sides, centred, and states how many pixels. Pad fits the whole photo inside and adds white bars. Stretch reports the old and new aspect ratio.
    4. Print size. px ÷ DPI × 2.54 = cm. 413 × 531 px at 300 dpi = 3.50 × 4.50 cm (1.38 × 1.77 in).
    5. File size window (JPG). Portals rarely say whether 1 KB is 1000 or 1024 bytes, so we use the strict side of each: minimum KB × 1024, maximum KB × 1000. The JPG quality is searched between 0.30 and 0.95. The pixels do not change. If the window can't be reached, the result says so. The file is never padded.
    6. DPI written. JPG: the JFIF header density, in dots per inch. PNG: the pHYs chunk in pixels per metre, DPI ÷ 0.0254 (300 dpi = 11811). We then read the DPI back from the saved file to prove it is there.
    7. Preset. The preset name, size and KB window, with a link to its official source and the date we checked it.

    Shrinking by more than half is done in halving steps for a sharper result. Phone photos are turned upright first. Resized files lose their metadata, including GPS location.

    Related: compress a JPG to a size in KB without fixing the pixel size, convert between JPG and PNG, or put photos into one PDF.

    Questions

    What DPI should I use for a 3.5 × 4.5 cm photo?

    Use 300 dpi unless the notice names another. 3.5 cm is 35 mm, and 35 ÷ 25.4 × 300 = 413 px. 4.5 cm gives 531 px. So you get 413 × 531 px. Portals check the pixel size and the KB, not the DPI tag. If the notice gives a pixel size, use that instead. That is why different resizers give different results: each picks its own DPI.

    Does changing DPI reduce quality?

    No. DPI is one number in the file header. It only sets the print size. Tick "Change DPI only" and the tool edits that number and leaves every pixel alone, as long as you keep the same format. Example: 2000 px at 300 dpi prints 2000 ÷ 300 × 2.54 = 16.93 cm wide. Some apps read the EXIF resolution instead, which this tool does not change.

    How do I get a photo to 200 × 230 px and between 20 and 50 KB?

    Pick the "Bank exam photo" preset and press Resize. It crops the photo to the 200:230 shape from the centre, scales it to 200 × 230 px, then searches the JPG quality until the file lands between 20 and 50 KB. The preview shows the crop before you download. The pixel size never changes during the KB search.

    My file is below the minimum KB. Should I pad it?

    No. Adding junk bytes can get a file rejected. Small images have a size ceiling: a 140 × 60 px signature JPG is only a few KB even at top quality. Raise the pixel size if the notice allows it, then save at high quality. For the UK passport (at least 600 × 750 px and 50 KB), use a larger photo instead of a smaller one. The tool tells you when a minimum cannot be reached.

    What size is a passport photo: 35 × 45 mm, 2 × 2 in or 630 × 810 px?

    35 × 45 mm is the ICAO maximum portrait size (ICAO Doc 9303 Part 3). At 300 dpi it is 413 × 531 px. 2 × 2 in is the US size. The US State Department asks for a square digital photo from 600 × 600 to 1200 × 1200 px, under 240 KB, and 2 in at 300 dpi is 600 px. 630 × 810 px is the India passport size in the Indian embassy ICAO guidelines. It has the same 7:9 shape as 35 × 45 mm. Each preset links to its source and shows the date we checked it.