Image · scale
Resize image to fit.
Enter the image size and the box it has to go in. Choose fit (whole image visible) or fill (box fully covered). Runs in your browser; nothing is uploaded.
Image and box
New size
Fill the form and press Calculate.
Worked example
A 4000 × 3000 photo going into a 1200 × 630 box. Fitting inside uses the smaller scale, 630 ÷ 3000 = 21%, giving 840 × 630 with 360 px of empty width. Filling uses the larger scale, 1200 ÷ 4000 = 30%, giving 1200 × 900, and you trim 270 px of height.
How it works
The scale for each side is box ÷ image. Fit takes the smaller of the two scales so nothing is cut; fill takes the larger so the box is covered. New sizes are rounded to whole pixels. By default the tool never enlarges an image past its own size, because enlarging adds no detail.
FAQ
What is the difference between fit and fill?
Fit scales the whole image to sit inside the box, which can leave empty space. Fill scales it until the box is covered, which cuts off the overflow.
How do I resize an image to a specific width and keep the ratio?
Divide the new width by the old width and multiply the height by that same number. Setting the box height very large makes the tool do exactly that; tick Allow enlarging if the new width is bigger than the original.
Why was my small image not enlarged?
Enlarging is off by default. Tick the option to allow it, and expect a softer result.
Does this resize my file?
No. It only calculates the numbers. Apply them in your image editor, or use the Resize Image tool.
Disclaimer
Arithmetic only. The tool does not open or edit your image.