Skip to the tool
CALCPARK

Image Resizer

Resize JPG, PNG and WebP images to exact pixels, a percentage or common widths in your browser. Keeps the aspect ratio and EXIF rotation; batch resize with ZIP download.

Files stay on your device
Loading the tool…

How to use it

  1. Drop one or more JPG, PNG, WebP, GIF, BMP or AVIF files. The original pixel size, megapixels and file size appear for each.
  2. Choose a mode: pixels (width and/or height), percent, or a preset width such as 1920 px for Full HD.
  3. Pick the output format and quality. “Same as source” keeps JPEG, PNG and WebP as they are.
  4. Press Resize. Download the single file, or the ZIP when you resized several, and check the before/after table.

Example

A 4,032 × 3,024 px phone photo (12.2 MP, 3.1 MB) resized to the 1,280 px preset becomes 1,280 × 960 px. At JPEG quality 85 the file is roughly 250–350 KB – about one tenth of the original – which is plenty for a web page or an email attachment. Choosing 50 % instead gives 2,016 × 1,512 px, a quarter of the pixels.

How the resizing works

The image is decoded with createImageBitmap using imageOrientation: 'from-image', so the EXIF orientation of phone photos is baked into the pixels (older browsers fall back to an <img> element, which is also oriented). The target size is computed from your settings:

fit:      scale = min(boxW / w, boxH / h)   →  w × scale, h × scale
percent:  w × p / 100, h × p / 100
preset:   presetW, h × presetW / w

Large reductions are drawn in halving steps (4000 → 2000 → 1000 → 800 px) with imageSmoothingQuality = 'high', because a canvas scales with bilinear filtering that only samples a 2 × 2 neighbourhood – a single big step would alias fine detail. The result is encoded with canvas.toBlob(). Re-encoding drops all metadata (EXIF, GPS, colour profiles); colours are converted to sRGB.

Limits: outputs are capped at 16,384 px per side and about 40 megapixels. Safari on iOS has a smaller canvas budget (historically around 16 MP), so very large outputs can fail there with an “could not encode” message – pick a smaller size. AVIF output appears only when the browser can encode it (most cannot yet). HEIC files are refused because browsers cannot decode them on a canvas; convert them to JPG first.

Sources: MDN – createImageBitmap() and imageOrientation, MDN – HTMLCanvasElement.toBlob(), Canvas size limits by browser (jhildenbiddle/canvas-size).

Questions

Does resizing reduce the file size?
Usually a lot: file size scales roughly with the number of pixels, so halving both sides cuts the size to about a quarter. Enlarging never adds detail, it only makes the file bigger and softer.
Why is my photo rotated correctly here but sideways in another program?
Phones store photos sideways and add an EXIF orientation tag. This tool applies the tag and writes upright pixels without the tag, so every viewer shows the result the same way.
What happens to transparency?
PNG and WebP keep it. JPEG has no alpha channel, so transparent areas are filled with white when you save as JPEG.
Can I resize several images to different sizes at once?
One setting applies to the whole batch. With the aspect ratio locked, every image is scaled to fit inside the box, so mixed portrait and landscape photos all fit without distortion.