Image resizer

Output
Weight
Change
Resample

Image Resizer

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.

Fit modes: cover, contain, stretch
3
Presets for common canvases
6
Longest edge accepted
9000px
Bytes uploaded
0

Step by step

How to use it

  1. 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.

  2. 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.

  3. 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.

  4. 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

A 4:3 photo into a 16:9 slide

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

Source
2400x1800 (4:3)
Target
1920x1080 (16:9)
Format
JPEG 92

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 was
Pixels kept by cover
75% of the height
Pixels added by contain
25% of the width
Distortion in stretch
1.33:1

There 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

What to know about resizing images

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

Which fit, for which job?

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

How the resize is defined

Fit modes
cover · contain · stretchCover scales by the larger factor and crops centrally; contain by the smaller and pads; stretch scales the axes independently.
Resampling
Canvas, high smoothing qualityAverages the discarded pixels rather than sampling one of them, which is what keeps a downscale from looking noisy.
Dimension limit
1-9000 px per sideValues outside the range are clamped rather than rejected.
Presets
1080² · 1080x1920 · 1280x720 · 1920x1080 · 1600x900 · 512²The canvases people actually resize for: social square and story, video, slide, hero, avatar.
Padding colour
Applied for contain and for JPEGThe same background fills contain's margins and stands in for transparency whenever the export has no alpha channel.

FAQ

Questions, answered plainly

How do I resize an image without losing quality?

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.

What is the difference between cover, contain, and stretch?

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.

Which format should I export?

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.

Can I resize an image to an exact file size?

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.

Why does my transparent PNG turn white?

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.

Is there a size limit, and is my photo uploaded?

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.