Resize a photo to exact pixel dimensions in your browser. Set a width and height, choose whether the picture is cropped or padded to reach that box, and watch the file weight and the resampling factor update as you go — the result is redrawn on every change, so there is no separate resize step.
Step by step
01Add the image
Drop a file anywhere on the page. It is decoded locally and drawn to a canvas — the original file is never uploaded and never modified.
02Give it a box
Type a width and height, or take a preset: square 1080, story 1080x1920, YouTube 1280x720, slide 1920x1080, hero 1600x900, avatar 512. The lock keeps the original aspect ratio while you type.
03Decide what happens to the leftover
Cover fills the box and crops the overflow from the centre. Contain fits the whole image and pads the remainder with the background colour. Stretch distorts to fit exactly — occasionally what you want, usually not.
04Pick the export format, then download
PNG for flat graphics and anything with transparency, JPEG or WebP for photographs with a quality slider. Share copies a link that reopens the same box, fit, and format.
Worked example
The case that produces most of the surprises: the source and the box disagree about shape, and the fit mode decides who gives way.
Given
The same pair, through each fit mode
cover scale x0.80 -> 1920x1440, centre crop
360px lost off the top and bottom
contain scale x0.60 -> 1440x1080, padded
240px of background down each side
stretch scale x0.80 wide, x0.60 tall
everything 33% squatter than it wasThere is no fit mode that keeps everything: a shape change costs you either pixels or space. Cover is the right default because cropping the edges of a photograph is usually invisible, while padding is always visible and distortion is always wrong. Where the crop matters — a face near an edge — resize with cover here, then move the crop yourself in the cropper.
Before you resize
Enlarging invents nothing
Scaling past the original dimensions interpolates between pixels that already exist; it cannot recover detail the sensor never recorded. A 500px image asked for 2000px comes back soft, and no setting here changes that. Go back to the original file if you have it.
A shape change always costs something
Cover pays in cropped pixels, contain pays in padded space, stretch pays in distortion. The only free case is a target that matches the source ratio — which is why the lock exists, and why the presets tell you their ratio.
Downscaling is where quality is won
The canvas resamples with high-quality smoothing, averaging the pixels that disappear rather than dropping them. That is why a downscaled photo often looks sharper than the original at the same display size, and why resizing before compressing beats the reverse order.
JPEG will fill your transparency
There is no alpha channel in JPEG, so a transparent background is composited onto the background colour before encoding. Keep PNG or WebP for logos and cut-outs, and set the background deliberately when you do choose JPEG.
The size on screen is not the size on disk
Halving both dimensions removes three quarters of the pixels, but the file does not shrink to a quarter — compression works on content, not on count. Check the reported bytes rather than assuming the arithmetic.
Settings travel, the picture does not
Share copies a link carrying the box, fit, format, and quality, so a colleague opens the same recipe with their own file. The image itself stays on your machine; nothing is uploaded at any point.
The judgement call
Pick by what the picture is for, not by what looks tidiest in the preview.
A photograph into a fixed banner or hero
Cover
Fills the space with no bars. Photographs survive edge cropping; empty margins always look like a mistake.
A product shot that must stay whole
Contain
Nothing is cut. Set the background to the surface it will sit on so the padding disappears.
A logo into a square avatar
Contain + PNG
Cropping a mark is worse than padding it, and PNG keeps the transparency so the padding is invisible.
A screenshot for documentation
Match the ratio
Set one dimension with the lock on. Cropping loses UI, padding wastes the page, stretching makes text look wrong.
The subject sits near one edge
Crop by hand
Cover always crops from the centre. Use the cropper to choose the framing, then resize the result.
A small image needed larger
Find the original
Upscaling interpolates; it cannot add detail. Any softness you see here will be worse at full size.
Reference
FAQ
Resize downwards and keep the aspect ratio locked. Reducing dimensions discards pixels, which the browser does cleanly with high-quality smoothing, so the result stays sharp. The resampling figure in the footer tells you which direction you are going: anything at or below 1.00× is a downscale. Going above 1× cannot add detail that was not in the original file.
Cover scales the image until it fills the whole target box and crops whatever hangs over the edges, centred — this is what you want for thumbnails and hero images. Contain scales until the entire image fits inside the box and fills the leftover space with the background colour, which is right when nothing may be cut off. Stretch ignores the original proportions and squashes the picture into the box exactly.
PNG is lossless and keeps transparency, so it suits logos, screenshots, and flat graphics. JPEG produces much smaller files for photographs but has no transparency. WebP is usually the smallest of the three at equivalent visual quality and is supported by every current browser. Switch between them and watch the Weight cell to see the real difference on your image.
This tool targets pixel dimensions. To hit a specific number of kilobytes, resize here first and then open the image compressor, which searches for the highest quality that still fits under a size budget you set in KB.
You are exporting JPEG, which does not support an alpha channel. The transparent areas are filled with the background colour from the Export section — set it to match the surface the image will sit on, or switch the format to PNG or WebP to keep the transparency.
Nothing is uploaded. The file is read with the browser's FileReader and redrawn on a canvas on your own machine, so the tool works offline and your images never touch a server. Output dimensions are capped at 9000 px per side, which is where browser canvas limits start to bite on mobile.
Every step runs in your browser: the file is decoded, resampled, and re-encoded on this device. No image is uploaded, stored, or logged, and share links carry only the settings.
Keep going
Image compressor
Hit a target file size in kilobytes by searching for the best quality that fits.
Format converter
Compare PNG, JPEG, and WebP output side by side and export the smallest.
Image cropper
Choose the crop by dragging it, rather than letting Cover centre it for you.
Thumbnail generator
Fixed social sizes with backgrounds, padding, and rounded corners.