How to Resize an Image to Exact Pixels Without Stretching It
Get an image to an exact pixel size without squashing it: crop to the right shape, lock the aspect ratio, and check the size the upload form wants.
To resize image pixels to an exact size without stretching, crop the picture to the shape of the target first, then resize it with the aspect ratio locked so the second number follows the first. Filo's Resize Image does both halves in your browser: type the width and height in pixels, keep Lock aspect ratio on, and download. The photo isn't uploaded.
This guide is about screens and upload forms, where only the pixel count matters. If you're preparing something to print at a size in centimetres or inches, see how to resize a photo in cm or inches instead.
Why images stretch when you resize them
Every image has a shape, its aspect ratio: width compared with height. A typical 12 megapixel phone photo is 4032 x 3024 pixels, a 4:3 shape. Type 1080 x 1080 into an editor with the lock off and it has to squeeze a 4:3 picture into a 1:1 square. Faces get wider, round logos become ovals, and text looks squat.
The fix is to keep the original shape when you change the size. With the lock on, you set one side and the editor works out the other:
New height = new width x original height / original width
So a 4032 x 3024 photo at 1080 pixels wide becomes 1080 x 3024 / 4032 = 810 pixels tall. The undistorted size is 1080 x 810. If the form insists on 1080 x 1080, you have to change the shape, and that means cropping.
Crop first when the target is a different shape
There are four ways to hit an exact pixel size, and only one of them looks right most of the time.
| Method | What you get | When to use it |
|---|---|---|
| Resize with the lock on | Exact width, height follows | The target has the same shape as your image |
| Crop, then resize | Exact width and height, some edges trimmed | The target is a square, a banner or any other shape |
| Add padding | Exact canvas, plain bars around the image | Nothing can be cut, such as a logo or a document page |
| Resize with the lock off | Exact width and height, distorted | Only when the two shapes are almost identical |
For most jobs, crop then resize. In Filo's Crop Image, choose Square, 4:3, 3:2, 16:9 or 9:16, or drag a free crop, and position the box over the part you want to keep. Then open Resize Image and type the size. Because the shapes now match, the locked height lands on the number you need.
For an odd ratio like a 1584 x 396 banner (4:1), use a free crop and aim for about four times as wide as tall. When you resize to 1584 wide with the lock on, the height will come out close to 396. Untick the lock for the last few pixels; a tiny change like that won't visibly distort anything.
Exact pixel sizes for common uploads
Check the destination before you resize. These are the sizes the platforms themselves publish:
| Where it's going | Size to use | What the official page says |
|---|---|---|
| Instagram feed post | 1080 x 1080 (square), 1080 x 1350 (portrait), 1080 x 566 (landscape) | Photos are shown up to 1080 px wide, with ratios from 1.91:1 to 4:5 (Instagram Help Center) |
| LinkedIn profile background | 1584 x 396 | JPG or PNG under 8 MB (LinkedIn Help) |
| YouTube video thumbnail | 3840 x 2160, or any 16:9 size such as 1920 x 1080 | 3840 x 2160 recommended, at least 640 px wide, JPG or PNG (YouTube Help) |
| US visa photo, digital | Square, 600 x 600 to 1200 x 1200 | JPEG, up to 240 KB (US Department of State) |
| UK passport, online | At least 600 x 750 | 50 KB to 10 MB (GOV.UK) |
The Instagram heights are arithmetic from the ratios: 1080 / 0.8 = 1350 for 4:5, and 1080 / 1.91 = 566 for the widest landscape.
Photos for passports and visas need more than the right pixel count, because the head has to sit at a set size in the frame. Use Filo's ID Photo Maker for those, and see the passport photo size by country table for other countries' upload sizes.
How to resize an image to exact pixels online
Filo's Resize Image runs in Chrome, Safari, Edge and Firefox on a computer or phone, and the image stays on your device.
- Add the image. JPG, PNG and WebP all work. You can add several at once, up to 50 in a batch, and the same settings apply to all of them.
- Choose Resize by Size. (Percent is there too if you just want half or a quarter of the size.)
- Pick Pixels as the unit. Centimetres, Inches and Millimetres are for print sizes.
- Type the width. With Lock aspect ratio on, the height fills itself in. Untick it only if you've already cropped to the right shape, or need an exact size that differs from the image by a few pixels.
- Download. The file keeps its original format, and you'll see the new sizes listed before you save.
A few limits are worth knowing. The tool won't make an image more than 20,000 pixels on a side, or larger than about 16 megapixels, because that's what a browser can reliably create. On the web you get 3 free conversions in total and each resized image uses one; free files carry a small Filo mark in one corner. The Filo app for iPhone, iPad and Android is free for life with ads, with no daily limit, if you resize often.
How to resize an image to exact pixels on a Mac
Preview, which comes with macOS, does exact pixel sizes well. Following Apple's Preview guide:
- Open the image in Preview and choose Tools > Adjust Size.
- Set the unit menu next to Width and Height to pixels.
- Keep Scale proportionally ticked so changing one side updates the other.
- Leave Resample image ticked. If you untick it, Preview changes the print size instead of the number of pixels.
- Type the width, click OK, then use File > Export if you want to keep the original.
To resize a batch, open all the images in one Preview window, select them in the sidebar, then choose Tools > Adjust Size once.
What about Windows, iPhone and Android?
On Windows, Paint has a Resize button on the Home tab that takes pixel values, with a Maintain aspect ratio box that works like the lock described above. Microsoft's current help for the Photos app covers cropping to preset ratios but doesn't describe a pixel resize, so Paint or a browser tool is the dependable route.
On phones, most built-in gallery editors crop to a shape but don't let you type an exact pixel size. The simplest fix is to crop in your gallery app (or in Filo's Crop Image), then open Resize Image in your phone's browser and type the width.
Shrinking, enlarging and file size
Making an image smaller keeps it sharp, because the editor only throws pixels away. Making it larger forces the editor to invent pixels the camera didn't capture, so text and edges go soft. Always resize from the original, largest version of the file, not a copy that's already been shrunk or sent through a messaging app.
Pixel size and file size are related but not the same. Halving both sides leaves a quarter of the pixels, so the file usually gets much smaller, but a form that says "under 100 KB" is talking about file size. If you hit the right dimensions and the file is still too heavy, run it through Image Compress with a size limit, or read our guide to reducing an image to 100 KB.
Get Filo free on iPhone and Android4.8 rating · 100K+ downloads
Frequently asked questions
How do I resize an image to exact pixels without stretching it?
Crop the image to the same shape as the target size first, then resize it with the aspect ratio locked. For a 1080 x 1080 post, crop to a square and resize to 1080 wide; the height follows. Resizing with the lock off forces the picture into a new shape, which is what causes the stretched look.
How do I work out the new height when I change the width?
Multiply the new width by the original height, then divide by the original width. A 3000 x 2000 photo resized to 1200 pixels wide becomes 1200 x 2000 / 3000 = 800 pixels tall. Most editors, including Filo's Resize Image and Mac Preview, do this for you when the aspect ratio is locked.
Does resizing an image reduce its file size?
Making it smaller usually does, because there are fewer pixels to store. Halving the width and height cuts the pixel count to a quarter. If an upload form sets a limit in KB rather than pixels, you may also need to compress the image, which lowers the file size without changing the dimensions.
Why does my resized image look blurry?
It was probably enlarged beyond its original size, or you started from a small copy, such as one saved from a chat app. Resizing up can't add detail that wasn't captured. Start from the original file, and if a platform recompresses uploads, give it an image at the exact size it recommends.
What is the difference between pixels and DPI?
Pixels are the real size of a digital image, and they're all that matters on screens and in upload forms. DPI only matters when you print: it decides how many pixels go into each inch of paper. For print sizes in centimetres or inches, you work out the pixels from the size and the DPI.



