How to Resize an Image to Any Exact Size

Illustration of an image being resized to an exact pixel size

To resize an image to any exact size, type the exact width and height into a resizer — or pick a preset for your destination — and choose how the photo fits: crop the edges, pad with a background colour, or fit inside. The free GridFix image resizer does all three in your browser, and your image never leaves your device.

Resize an image to any exact size — free, no upload

“Resizing” sounds like one job, but every upload form means something slightly different by it. A visa form wants exact pixels and a KB cap. Shopify wants a square canvas. Instagram wants a 4:5 portrait. Your blog wants a maximum width. This guide covers all of them: the exact numbers for each destination, the crop-vs-pad decision that decides whether your photo gets cut or stretched, and the free online way plus your phone and desktop.

Exact size means three numbers, not one

A form that says “resize your image” is usually checking three things: the width in pixels, the height in pixels, and the file size in KB. Get any one wrong and the upload is rejected — even when the photo looks fine on your screen.

ID and form sizes (exact official numbers)

What it is for Exact size The rule behind it
US visa photo (DS-160) 600×600 to 1200×1200 px, JPEG, 240 KB or less US Department of State
UK passport, online application At least 600×750 px, JPEG, 50 KB–10 MB GOV.UK
Canada passport, online renewal 1200×1800 to 3000×4500 px, JPEG, 200 KB–5 MB IRCC / Canada.ca
UK passport, print 35×45 mm = 413×531 px at 300 DPI GOV.UK
Canada passport, print 50×70 mm = 591×827 px at 300 DPI IRCC / Canada.ca

For the full walkthrough of each one, see our guides to resizing a photo to 600×600 pixels, the UK digital passport photo and the Canada digital passport photo for online renewal. Our pixel chart converts any print size in mm to pixels at 300 and 600 DPI.

Marketplace, social and web sizes (resizer presets)

What it is for Exact size Ratio
Shopify product, square 2048×2048 px 1:1
Shopify collection 1024×1024 px 1:1
Etsy listing 2000×1500 px 4:3
Etsy square 2000×2000 px 1:1
Instagram square 1080×1080 px 1:1
Instagram portrait 1080×1350 px 4:5
Facebook / link preview 1200×630 px 1.91:1
X post image 1600×900 px 16:9
LinkedIn post 1200×627 px 1.91:1
YouTube thumbnail 1280×720 px 16:9
Web hero 1920×1080 px 16:9
Blog image Max 1200 px wide Keeps your ratio
Web thumbnail 400×400 px 1:1
Avatar 256×256 px 1:1

These are the presets built into the GridFix image resizer. They are common sizes at the time of writing, not official guarantees — Shopify, Etsy and the social networks change their recommendations, and themes add their own rules. If a size matters, check the upload screen or the platform help page, then type the exact numbers into the custom boxes.

Crop, pad or fit — choose before you type the numbers

Typing “1080 × 1080” into a resizer is not enough on its own. Your photo is almost certainly not square, so the tool has to decide what happens to the parts that do not fit. There are three honest answers, and picking the wrong one is how photos get cut or stretched.

Crop to fill keeps the exact canvas and cuts the overflow. Take a 4000×3000 phone photo and ask for an Instagram square, 1080×1080. The tool scales the photo until its short side hits 1080 — a scale of 0.36 — then crops a 3000×3000 window out of the middle. That cuts 500 pixels off the left and 500 off the right. Nothing is stretched, but anything near the edges is gone. Use it when the subject is centred and the edges are expendable.

Pad keeps the whole photo and fills the leftover space with a background colour, white by default. The same 4000×3000 photo asked for a Shopify square, 2048×2048, scales to 2048 wide — a scale of 0.512 — and comes out 2048×1536. The tool adds a 256-pixel white bar at the top and a 256-pixel bar at the bottom to reach the exact 2048×2048 canvas. Nothing is cut and nothing is stretched, but the bars are part of the file. Use it when nothing may be cut off — a product photo, a logo, a document.

Fit inside keeps the ratio and scales the whole photo to fit inside the box, with no padding and no crop — so the result may be smaller than the box you asked for. The same photo asked for a blog image at most 1200 wide comes out 1200×900 exactly, because 4000×0.3 is 1200 and 3000×0.3 is 900. Use it when the form accepts “up to” a size rather than an exact size.

If the form demands an exact canvas — most ID forms and marketplace feeds do — you want crop to fill or pad, not fit inside. If it accepts anything up to a size, fit inside is the cleanest option.

The stretch trap

Stretching is the fourth option, and it is the one to avoid. It forces the photo into the box by scaling the width and height separately, so faces come out wide or tall.

Take that 4000×3000 photo (a 4:3 ratio) and force it into an Instagram portrait, 1080×1350 (a 4:5 ratio). The width scales by 1080 ÷ 4000 = 0.27, but the height scales by 1350 ÷ 3000 = 0.45 — the height is stretched 1.67 times more than the width, so faces come out about 67% taller than they really are.

The fix is to crop to the target ratio first, then resize. To turn a 4000×3000 photo into a 4:5 portrait, crop the width to 2400 pixels (3000 × 4 ÷ 5), which cuts 800 pixels off each side and leaves a 2400×3000 frame. Then scale that frame to 1080×1350 and nothing is distorted. If you only need a 600×600 square, the same rule applies — crop to a square first, then scale — as our guide to resizing a photo to 600x600 pixels shows step by step.

Method 1: Resize in the browser (free)

The fastest way, on any device:

  1. Open the image resizer and drop in your photo — JPG, PNG, WebP or GIF, one file or a whole batch. Phone photos are rotated the right way up using the orientation stored in the file. iPhone HEIC photos need the HEIC to JPG converter first.
  2. Pick a preset — Shopify square, Etsy listing, Instagram portrait, web hero — or type your own width and height into the custom boxes.
  3. Choose how it fits: Crop to fill for an exact canvas with the edges cut, pad for an exact canvas with the whole photo kept, or fit inside when the form accepts anything up to a size.
  4. If your form has a file size limit, type it into the target size box and pick JPG or WebP. The tool searches for the highest quality that still fits.
  5. Press Download. Each result shows its new pixel size, file size and the quality used.

Everything runs in your browser. The photo is not uploaded to a server, which matters for ID pictures because they are personal — and once the page has loaded, it keeps working offline.

If the photo is for a specific form, use the dedicated resizer instead: the US visa photo resizer has the 600×600 preset, a face-position guide and a 240 KB box built in, and the UK, Canada and Schengen resizers carry their own country presets.

Method 2: Resize on your phone

Phone gallery apps can crop to a ratio, but they do not let you type an exact pixel size. So this is a two-step job: crop on the phone, exact size in the browser.

iPhone: open the photo in Photos, tap Edit, tap Crop, tap the aspect ratio icon and choose the ratio your destination wants — Square for 1:1, 4:5 for an Instagram portrait, 16:9 for a wide banner. Save it. Then open the image resizer in Safari, upload the cropped photo and type the exact pixels.

Android: in Google Photos, tap Edit, then Crop, then Aspect ratio, and choose the ratio. Then run the cropped photo through the image resizer to get the exact pixel size.

Start from a sharp original. If the photo is smaller than the size you need on its short side, enlarging it will make it soft, because no new detail is created. Take the photo again at a higher resolution instead.

Method 3: Resize in Photoshop, Paint and Preview

Desktop editors work too, but they make you do the fit decision by hand — and they cannot search for a KB limit for you.

Photoshop

  1. Open the photo and pick the Crop tool. Set the ratio to your target (1:1, 4:5, 16:9) and drag the crop around your subject.
  2. Go to Image, then Image Size. Set the width and height to your exact pixels.
  3. To pad instead of cropping, use Image, then Canvas Size, set the canvas to your exact pixels, and pick the background colour.
  4. Use File, Export, Save for Web (Legacy). Choose JPEG and lower the quality until the file size shown is under your limit.

Paint (Windows)

  1. Open the photo and use Select to drag a rectangle around the area you want. The bar at the bottom shows the selection size, so keep it at your target ratio.
  2. Choose Crop.
  3. Choose Resize, switch to Pixels, keep the aspect ratio locked and enter your width. The height follows from the ratio.
  4. Save as JPEG. Paint cannot pad a canvas or search for a KB limit, so check the file size yourself and lower the quality in another app if it is too big.

Preview (Mac)

  1. Open the photo and use the Rectangular Selection tool to draw a rectangle at your target ratio around your subject.
  2. Choose Tools, then Crop.
  3. Choose Tools, then Adjust Size. Set the unit to pixels and enter your width. The height follows because the ratio is fixed.
  4. Choose File, then Export, pick JPEG and drag the quality slider. The estimated file size appears below it.

Keep the file under your form’s KB limit

Pixel size is only half the job. A 2048×2048 JPEG straight out of a camera can be several megabytes, and most forms cap the file as well as the pixels.

  • Type the limit into the target size box. In the GridFix resizer, type the number — 200, for example — and leave the format on JPG or WebP. The tool tries the quality you chose first, then searches downward for the highest quality that still fits. If the lowest quality is still too big, tick “Shrink pixels if needed” and it reduces the dimensions in 10 percent steps until the file fits.
  • Pick the right format. JPG suits photos and works everywhere. WebP is usually 25 to 35 percent smaller than JPG at the same look, but a few upload forms still reject it, so check the form first. PNG keeps sharp edges and transparency, which suits logos and screenshots — but it is the largest of the three for photos, and it has no quality setting, so a PNG can only get smaller by losing pixels.
  • Do not push quality so low that the photo turns blotchy. A clean 200 KB file beats a muddy 100 KB one. If it still will not fit, retake the photo in front of a plain wall, or run it through the image compressor. Our guide to compressing a passport photo under 240 KB goes through it step by step.
  • Resize only once, working from the original. Every extra JPEG save costs a little quality.

Check the result before you upload

Open the finished file at full size and run through this list:

  • It shows the exact width and height your form asked for.
  • The file is under your form’s size limit.
  • The format is JPEG (unless the form asks for PNG or WebP).
  • The subject is centred, sharp and not stretched.
  • Nothing important is cut off at the edges — and if you padded, the bars are the colour you expected.

Troubleshooting

Problem Likely cause Fix
Subject looks wide or tall The photo was stretched, not cropped Crop to the target ratio first, then resize
Edges look cut off Crop to fill cut them Re-crop with more space around the subject, or use pad
White bars top and bottom Pad mode filled the leftover space Switch to Crop to fill if the bars are unwanted
Upload says the file is too large It is over the form’s KB limit Lower the target KB, or tick “Shrink pixels if needed”
Upload says wrong format The file is a PNG or WebP the form rejects Export it as JPEG
Photo looks blurry The original was smaller than the target size Start from a larger original; keep “Allow enlarging” off
Form says wrong size Fit inside returned a smaller size than the box Use Crop to fill or pad for an exact canvas
Colours look off The photo was saved in the wrong colour space Keep sRGB for uploads; see our sRGB guide

Sources

Frequently asked questions

How do I resize an image to an exact size?

Pick a preset (Shopify, Etsy, Instagram, web) or type the exact width and height into the custom boxes, choose how the photo should fit — crop to fill, pad, or fit inside — and download. The free GridFix image resizer does it in your browser, and nothing is uploaded.

How do I resize an image without stretching it?

Never type a width and height with a different ratio from your photo and let the tool stretch it. Crop to the target ratio first, or use the resizer's Crop to fill option (which crops the edges) or pad option (which keeps the whole photo and fills the rest with a background colour).

What size should I resize my image to?

It depends on where the image is going: US visa photos are 600×600 to 1200×1200 px, UK digital passport photos at least 600×750 px, Shopify products 2048×2048 px, Etsy listings 2000×1500 px, Instagram squares 1080×1080 px. The tables below list the exact numbers. Marketplace and social presets are common sizes at the time of writing, not official guarantees — check the platform if the size matters.

How do I make an image under a certain number of KB?

Type the limit into the target size box — 200, for example — and leave the format on JPG or WebP. The resizer tries your quality first, then searches downward for the highest quality that still fits. If the lowest quality is still too big, tick 'Shrink pixels if needed' and it reduces the dimensions in 10 percent steps until the file fits. PNG has no quality setting, so a PNG can only get smaller by losing pixels.

Can I enlarge a small image to a bigger size?

You can, but the result will look soft, because enlarging invents pixels that were never captured. The resizer's 'Allow enlarging' option is off by default for that reason. If a form demands a size bigger than your photo, enlarge it only as far as the form requires — and if you can, start from a larger original instead.

Is my image uploaded to a server when I resize it?

No. Your browser decodes the file, redraws it on a canvas and encodes the result. Nothing is sent to GridFix or anyone else, and once the page has loaded it keeps working offline.