Skip to content
AllToolsDesk

Popular

  • JSON Formatter & ValidatorFormat, minify and validate JSON with error locations.
  • CSS FormatterBeautify CSS, SCSS and Less with Prettier.
  • CSS MinifierCompress CSS and see the bytes saved.
  • JavaScript FormatterBeautify JavaScript and TypeScript.
  • JavaScript MinifierMinify JavaScript with Terser.
  • HTML FormatterIndent HTML, including inline CSS and JS.
  • Compress PDFShrink PDFs for email and upload limits.
  • Word to PDFConvert .docx documents to PDF.
67 free toolsSee all tools

Forms and uploads

How to Resize a Photo to Exact Pixels for Online Forms (Without Stretching It)

By the AllToolsDesk team · Updated

Online forms ask for photos in exact pixel sizes, such as 200 × 230 px, or in centimetres, such as 3.5 × 2.5 cm. A phone photo is about 3000 × 4000 px and a different shape, so it needs two changes: a crop to the right shape and a resize to the right number of pixels. Doing only the resize stretches or squashes the photo, which is one of the most common reasons for rejection.

This guide explains the units, shows how to convert centimetres to pixels, and gives a reliable order of steps.

Pixels, centimetres and DPI

A digital image has only pixels. Centimetres appear when it is printed, and DPI (dots per inch) links the two: at 200 DPI, every inch of print holds 200 pixels. So a size in centimetres means nothing for an upload until the form also gives a DPI, or a pixel size.

To convert: pixels = cm ÷ 2.54 × DPI. For the PAN card photo, 2.5 × 3.5 cm at 200 DPI: 2.5 ÷ 2.54 × 200 = 196.9 and 3.5 ÷ 2.54 × 200 = 275.6, so 197 × 276 px. A 35 × 45 mm passport photo at 300 DPI is 413 × 531 px.

Centimetres to pixels at common DPI values (width × height)
SizeAt 200 DPIAt 300 DPI
2.5 × 3.5 cm197 × 276 px295 × 413 px
3.5 × 4.5 cm276 × 354 px413 × 531 px
5 × 5 cm (2 × 2 in)394 × 394 px591 × 591 px

Crop to the shape first

Shape is the ratio of width to height. 200 × 230 px is slightly taller than wide (0.87); a phone photo at 3000 × 4000 px is taller still (0.75). Squeezing 3000 × 4000 straight into 200 × 230 would make a face look wider than it is.

Instead, crop the photo to the target shape and then shrink it. For 200 × 230 from 3000 × 4000, keep the full width of 3000 px and a height of 3000 × 230 ÷ 200 = 3,450 px, cutting 550 px from the top and bottom together. Now the shapes match and the resize to 200 × 230 is clean.

Steps that work on a phone

  1. Take the photo in good light, against a plain light wall, with the camera at eye level and your face filling about two thirds of the height.
  2. Open the Exam Photo Resizer if your form is listed there, since it has the sizes built in; otherwise crop to the shape with Crop Image.
  3. Resize to the exact width and height in pixels with Resize Image. After cropping to the right shape, keeping the aspect ratio gives the exact size.
  4. Download as JPG and check the file size. If the form also has a KB limit, run the result through Compress Image to reach it.

Upload limits in KB are separate from pixel sizes. Two photos of exactly 200 × 230 px can differ several times in file size, depending on the background and detail.

Common mistakes

  • Resizing a screenshot of the photo instead of the photo itself, which adds borders and lowers quality.
  • Enlarging a small photo to a bigger size: it gets the right pixel count but looks blurred.
  • Saving as PNG when the form wants JPG; PNG files of photos are also much larger.
  • Width and height swapped: forms list width first, so 200 × 230 is 200 px wide.