Resize Image
Published Updated
Enter a new width and height in pixels, up to 10,000 on each side, and save the image as PNG, JPEG or WebP.
Pick the output format first
PNG is the default, and it is rarely the smallest choice for a photo. JPEG has no transparency, so transparent areas are filled with white first. Both Lossy. Compression that throws some detail away to get a smaller file, so the decoded result only approximates the original. JPEG is the best-known example; each further lossy save can remove a little more. Read the guide formats are saved at quality 0.92.
| Format | Setting used | Transparent areas | Best for |
|---|---|---|---|
| PNG (default) | Lossless | Kept | Logos, screenshots, graphics |
| JPEG | Quality 0.92 | Filled with white | Photos with no transparency |
| WebP | Quality 0.92 | Kept | Web pages where smaller files matter |
What the numbers do
With the lock on, the other side is calculated from the original proportions and rounded to a whole pixel. A 4032 x 3024 phone photo set to 1200 wide becomes 1200 x 900. Set to 2048 wide it becomes 2048 x 1536. The photo went from 12.2 million pixels to 1.08 million, which is why the file shrinks so much more than the dimensions suggest.
The resize is a single drawImage call on a canvas at the new size, using the browser's default scaling. For very large reductions, such as 4032 px down to 200 px, the result can look harsher than an editor that averages pixels in steps. If edges look jagged, reduce in several steps of about half the size each. The test below shows why.
Resizing an image, step by step
Step 1
Add an image
Pick a PNG, JPEG, WebP or another format your browser can open. Its current width and height are filled in.
Step 2
Enter width or height
Type one side with the lock on and the other follows. Each side can be from 1 to 10,000 pixels.
Step 3
Choose PNG, JPEG or WebP
Press Resize Image. The result card compares the old and new file sizes, then offers the download.
When Resize Image is the wrong tool
It sets exact dimensions and nothing else. For related jobs:
- To hit a file size such as 200 KB, use Compress Image to Size.
- To make a small picture larger, use Image Enlarger, which offers smooth and pixelated scaling up to 10x.
- To cut away part of the picture, use Crop Image. To resize many files to one size, use Bulk Image Resizer.
Canvas output behavior is described in the HTMLCanvasElement.toBlob documentation: PNG by default, with a quality argument for JPEG and WebP.
The same photo at three widths and three formats
The test picture is generated, not a real photo: a 4032 x 3024 gradient with colored discs and grain, saved as a JPEG at quality 0.92 by the browser (3,947,647 bytes in Chromium; the browsers write slightly different JPEGs, so the source size differs per engine). We ran the tool's resize step, which is a drawImage call and a toBlob call, with the lock on, in Chromium 153 (Playwright build, not Google Chrome), version 153.0.8010.12, headless.
| Width x height | PNG | JPEG 0.92 | WebP 0.92 |
|---|---|---|---|
| 1200 x 900 | 2,259,177 B | 263,369 B | 240,320 B |
| 2048 x 1536 | 6,712,205 B | 914,518 B | 892,906 B |
| 200 x 150 | 75,687 B | 13,241 B | 11,846 B |
PNG was 6 to 9 times the JPEG here, probably because the grain in the picture does not compress losslessly. We did not measure a flat logo or a screenshot. WebP came out 2 to 11 percent below the JPEG in this run. In Firefox 155.0 the 1200 x 900 results were 1,999,859 B (PNG), 499,594 B (JPEG) and 360,590 B (WebP), so the ranking held but the sizes did not.
Asking for WebP in Playwright's WebKit build (not the Safari app), version 26.6, gave a PNG of the same size as the PNG request, 2,072,815 bytes at 1200 x 900. The tool detects that and shows a note, so you are told the file is not a WebP.
One big reduction or several steps
We shrank a 4000 x 3000 test image to 200 x 150, a factor of exactly 20, and compared each result with the exact average of every 20 x 20 block. The image has three zones: one-pixel black lines every 3 pixels, sparse 2-pixel dots, and grainy gradient with discs. The numbers are the mean absolute difference per color channel (0 to 255), so lower is closer to that average. It is one reference and one synthetic picture, not a judgment of how a result looks.
| Engine | Method | Thin lines | Dots | Photo-like |
|---|---|---|---|---|
| Chromium 153 | one step | 7.18 | 1.47 | 2.62 |
| Chromium 153 | two steps (1000 wide, then 200) | 33.72 | 31.00 | 4.29 |
| Chromium 153 | halving five times | 7.18 | 1.48 | 2.94 |
| Firefox 155 | one step | 50.95 | 31.00 | 5.30 |
| Firefox 155 | halving five times | 7.18 | 1.48 | 2.94 |
| WebKit 26.6 | one step | 4.62 | 24.07 | 4.29 |
| WebKit 26.6 | halving five times | 5.28 | 2.47 | 2.03 |
Halving (2000, 1000, 500, 250, then 200 wide) stayed close to the block average in all three engines. A single step did badly on thin lines in Firefox and on dots in Firefox and WebKit. Two uneven steps made things worse in Chromium. The tool works that way itself: when the new size is less than half the old one, it halves the picture, each side on its own, until less than a halving is left, then draws the exact size. Set to 800 wide, a 4000 x 3000 picture of one-pixel black and white lines comes out an even grey of 127 to 128 in Google Chrome 156, Chromium 153, Firefox 155 and the WebKit build.
Widths round to a whole pixel. A 4032 x 3024 photo set to 1001 wide gets 751 high (750.75), and a 1920 x 1080 frame set to 1000 wide gets 563 (562.5 rounds up). Typing 10001 is corrected to 10000.
What the resized file keeps from the original
Five generated files went through the site's own Resize Image component with the lock on, halved in width and saved as PNG, JPEG and WebP, measured in Google Chrome 157, Firefox 155 and the WebKit build.
| Original | What the resized file has |
|---|---|
| A photo stored 400 x 300 with EXIF orientation 6 (turn 90 degrees clockwise) | Width and height start at 300 x 400, and the picture comes out upright, in all three browsers |
| The same photo's camera make, model and GPS position (EXIF) | None of them, in PNG, JPEG or WebP. The WebKit build writes its own small EXIF block that holds only the colour space (sRGB) and the new pixel size |
| An animated GIF of three frames: red, green, blue | A still picture of the first, red frame, in all three |
| A 16-bit RGBA PNG, half of it 50% transparent | 8 bits per channel; the transparent half keeps alpha 128 in PNG and WebP |
| A JPEG with a wide-gamut colour profile, every pixel stored as 200, 100, 50 | Converted to sRGB before the resize: 225, 100, 46 in Chrome 157 and 226, 100, 46 in the WebKit build |
| A CMYK JPEG, every pixel C 0, M 153, Y 204, K 0 | 255, 102, 51 in Chrome 157; 231, 123, 72 in the WebKit build |
| Colour profile written into the result | Chrome 157: an sRGB profile in JPEG and WebP. The WebKit build: an sRGB chunk in PNG. Firefox 155: none |
| JPEG at quality 0.92: colour detail | Chrome 157 and the WebKit build store colour at half width and height (4:2:0); Firefox 155 keeps it at full size (4:4:4) |
The two colour rows come from Chrome 157 and the WebKit build, because the Firefox 155 build used here has its colour management switched off.
The HTML standard has a canvas draw an animated image as its default image, or else its first frame, and its drawing model converts every image to the canvas's colour space, which is sRGB unless a page asks for another. A saved canvas image of a type that supports colour profiles must include one; of the results here, Chrome 157's JPEG and WebP files and the WebKit build's PNG files did.
Resize Image FAQ
Why is the resized PNG larger than my original JPEG?
PNG is lossless and the default output here, so a photo saved as PNG is often several times larger than the same photo as JPEG. Choose JPEG or WebP in the format menu when file size matters. Both are saved at quality 0.92.
What happens to transparent parts when I save as JPEG?
JPEG has no alpha channel, so the canvas is filled with white first and the image is drawn on top. Transparent areas come out white and soft edges blend into white. Choose PNG or WebP to keep the transparency, or fill the background in another editor if you need a color other than white.
Does resizing remove the location data from a photo?
Yes. The picture is redrawn on a canvas and saved as a new file, so GPS coordinates and camera details are gone. A test photo with GPS and camera tags gave results without them in Chrome 157, Firefox 155 and the WebKit build; the WebKit build adds its own EXIF block that holds only the colour space and the new pixel size.
What is the largest size I can ask for?
10,000 pixels on each side. Values outside 1 to 10,000 are corrected as you type. Very large results can still fail on phones, where browsers allow smaller canvases.
Can I resize by percentage or to centimeters?
No. The fields are pixels only. Divide the target by the current width to get a percentage yourself: 1200 / 4032 is 29.8%.
What if I turn the aspect lock off?
Then width and height are independent, and the picture is stretched to fit exactly what you typed. There is no crop or fit mode, so use Crop Image first if you need a different shape.
Is one big reduction as good as several small ones?
In our test it was not. Going from 4000 to 200 pixels wide in one step left large errors on one-pixel lines in Firefox 155 and on small dots in Firefox and WebKit, while five halving steps stayed close to a block average in all three engines. Chromium 153 handled one step well but did worse with two uneven steps. The test used a generated picture, so treat it as a hint. The tool itself shrinks in halving steps whenever the new size is less than half the old one, so one pass is enough.
Why did I get a PNG when I chose WebP?
The browser could not write WebP. The WebKit build returned a PNG for a WebP request, while Chromium 153 and Firefox 155 wrote WebP. The tool shows a note when that happens.
Why is my height one pixel off from my own calculation?
The locked side is rounded to the nearest whole pixel. 1920 x 1080 at 1000 wide is 562.5, and the tool gives 563.
Will a phone photo come out sideways?
No. A test photo stored 400 x 300 with the EXIF note to turn it 90 degrees opened as 300 x 400 in the size fields and came out upright in Chrome 157, Firefox 155 and the WebKit build. The turn is applied to the pixels, so the result needs no orientation tag.
Does an animated GIF stay animated after resizing?
No. The result is one still picture of the GIF's first frame, saved as PNG, JPEG or WebP. A three-frame test GIF gave its first, red frame in all three browsers.
Why do the colours change after resizing?
The browser converts a photo with a wide-gamut colour profile to sRGB before the resize. A pixel stored as 200, 100, 50 came out 225, 100, 46 in Chrome 157 and 226, 100, 46 in the WebKit build. CMYK JPEGs are converted to RGB as well, and the two browsers did that differently: 255, 102, 51 against 231, 123, 72 for the same test colour.
Related guide
JPG, PNG, WebP, HEIC and SVG: which image format to use. The guide explains raster resolution: why shrinking the pixel size cuts a file far more than the dimensions suggest.