Aspect Ratio Resizer
Resize an image to a target aspect ratio.
About this tool
Enter a target width, height or both, then choose how the picture should meet that box. Fit keeps the whole image, Pad adds bars, Fill crops the edges, Stretch distorts. Leave one side empty and it follows the image's own ratio.
How to use
How it works
Fit inside scales the image to the largest size that fits the box, so the output can be smaller than the box on one side. Pad and Fill always give exactly width x height: Pad centers the whole image on a coloured canvas, Fill scales until the box is covered and crops the overflow from the center. Stretch ignores the ratio.
Worked example
A 2:1 banner into a square
- Input
- 2000 x 1000 px, target 400 x 400
- Output
- Fit: 400 x 200 | Pad: 400 x 400 with 100 px bars top and bottom | Fill: 400 x 400, center cropped
- Walkthrough
- The scale is min(400/2000, 400/1000) = 0.2 for Fit and Pad, so the image becomes 400 x 200.
Limitations
- Output is JPEG or PNG only.
- Upscaling cannot add detail.
- No face or subject aware cropping in Fill.
Questions
How do I resize without distortion?
Can I enter only a width?
What colour are the bars in Pad mode?
Is the image uploaded?
Features
- Width and height fields
- Four fit modes
- Bar colour for padding
- Runs in your browser
Guides
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
How Image Compression Works
Leo Isikdogan
Compression intuition for resize and optimize image tools.
Watch on YouTubeHow are Images Compressed? JPEG In Depth
Branch Education
JPEG mechanics behind smaller web and social exports.
Watch on YouTube
- Responsive images
web.dev
srcset and sizes patterns next to resize workflows.
- Image file type and format guide
MDN
Format tradeoffs before you resize or re-encode for the web.