Image Resizer
Resize images locally with two modes: longest side or percentage. Aspect ratio is always preserved, new dimensions are computed live, and the result downloads in one click.
A forum that caps images at 800 pixels wide, a chat app that wants the longest side at 1080 — resizing comes in two modes: by longest side when the target is absolute, by percentage when it is relative. Either way the aspect ratio is preserved and the new dimensions are computed live, so the result can be checked before downloading, and the photo never leaves the machine.
Some boundaries. Shrinking with smooth interpolation is essentially imperceptible; enlarging blurs, because there are no extra pixels to be had and interpolation only invents them — up to 400% is supported but overdoing it shows. This tool resizes without cropping, so a square avatar or a 9:16 cover needs cropping first. And an animated GIF, passing through the canvas, comes out as a single static PNG.
Did this tool solve your problem?
Submitting sends the tool name, your input and the current result to the server. Please do not include ID numbers, phone numbers or other private data.
AI assistant It answers using your current input and result
Asking again sends your current input and result to the server once more. Please do not include private data.
How to use
- Load the image.
- Choose the mode: by longest side, or by percentage.
- Check the computed new dimensions — the aspect ratio never changes.
- Download the resized image.
How it works
Two resize modes
After choosing an image, pick "by longest side" or "by percentage": the former suits explicit targets like "shrink to 800 wide", the latter relative ones like "half size". New dimensions appear live in the result area.
Aspect ratio is always preserved
Never distorted. Scaling always computes from the original aspect ratio and only allows proportional change; the result area shows both the scale factor and final width and height.
Upscaling limits
Percentages go up to 400%. But upscaling cannot conjure detail back — enlarging past the original resolution blurs noticeably, and "enlarge first, then compress" is a losing move.
Resize vs. crop
This tool scales only, never crops. For fixed ratios like square avatars or 9:16 covers, crop first with your gallery or screenshot tool, then resize here to the target.
Code example
JavaScript Scale by the longest edge
// three conventions: longest edge, width, height - all must keep the aspect ratio
async function resize(file, maxEdge) {
const img = await createImageBitmap(file);
const scale = Math.min(1, maxEdge / Math.max(img.width, img.height));
const w = Math.round(img.width * scale);
const h = Math.round(img.height * scale);
const canvas = document.createElement('canvas');
canvas.width = w;
canvas.height = h;
const ctx = canvas.getContext('2d');
ctx.imageSmoothingQuality = 'high'; // the default is blurry on downscale, raise it
ctx.drawImage(img, 0, 0, w, h);
return canvas;
}
Python Two resizing conventions in Pillow
from PIL import Image
img = Image.open('photo.jpg')
# 1) thumbnail: shrinks in place to fit the given box, never enlarges (simplest)
img.thumbnail((800, 800))
# 2) resize: compute the target size yourself, allows up and down
w, h = img.size
scale = 800 / max(w, h)
out = img.resize((round(w * scale), round(h * scale)), Image.LANCZOS)
out.save('resized.jpg', quality=90)
FAQ
How is the resized image's quality?
Shrinking is essentially lossless to the eye — the browser resamples with smooth interpolation. Enlarging blurs, since missing pixels can only be interpolated. Photos destined for print shouldn't be shrunk first.
Are photos stored on your server?
No. Images exist only in browser memory while computing and vanish when the page closes — completely unlike upload-based editing sites.
Is resizing the same as compressing?
No. Resizing changes pixel count (900x600 → 450x300); compression changes storage efficiency (same size, smaller file). They combine well: resize to target first, then compress.
What longest-side value should I use?
Reference points: chat sharing 1080-1280, web images 800-1200, avatars 200-400, ID photos whatever the agency demands. 0 keeps the original size.
Why might the output format differ from the original?
Scaling runs through canvas re-encoding. Special formats like animated GIFs export as static PNG; JPG/PNG sources usually write back in their own format when kept.
Does it work well on phones?
Yes. The whole pipeline runs in the browser — pick from the gallery, resize and download just like any other page. For large images, work with a charged battery to keep the background process alive.
Can I resize several at once?
One at a time in the current version — swap images to continue. Batch resizing is scheduled; tell us your scenario via page feedback.