Resize images
- Runs in your browser
- No signup
- Formula shown below
- Reviewed
Resizing an image changes its pixel dimensions. Fitting inside a bounding box uses the smaller of the two ratios, so a 4000 × 3000 photograph constrained to 1920 × 1080 becomes 1440 × 1080, not 1920 × 1080 — using the larger ratio would distort it. This tool resizes in batches inside the browser.
How to resize an image
- 01
Add your images
Drag one or many images onto the drop zone. JPG, PNG, WebP, GIF and BMP are all accepted, and batches are processed in one pass.
- 02
Pick a target size
Choose a preset such as Full HD or Thumbnail, or type your own maximum width and height in pixels.
- 03
Or scale by percentage
Tick the percentage option and enter a figure to scale every image by the same proportion rather than to a fixed box.
- 04
Process and download
Press Process, review the before-and-after sizes for each image, then download them individually or all at once.
The formula
scale = min(maxW ÷ w, maxH ÷ h); w′ = round(w × scale), h′ = round(h × scale)
- w, h
- The original pixel width and height of the image.
- maxW, maxH
- The bounding box the image must fit inside.
- scale
- The smaller of the two ratios, which guarantees both dimensions fit.
- w′, h′
- The resulting dimensions, rounded to whole pixels.
Downscaling by a large factor in a single step aliases badly, because each output pixel samples only a few input pixels and ignores the rest. Anything below half size is therefore reduced in successive halvings first — the same principle as a mipmap chain — which is why output here is visibly sharper than a naive one-pass resize.
Worked example
- Source
- photo.jpg — 4000 × 3000 pixels, 5.2 MB
- Max width
- 1920 px
- Max height
- 1080 px
- Result
- 1440 × 1080 pixels, about 480 kB
The width ratio is 1920 ÷ 4000 = 0.48 and the height ratio is 1080 ÷ 3000 = 0.36. The smaller value, 0.36, is used so both dimensions fit inside the box. The result is 4000 × 0.36 = 1440 wide and 3000 × 0.36 = 1080 tall. Pixel count falls from 12.0 megapixels to 1.56 megapixels, a reduction of 87%, and file size falls by roughly the same proportion because JPEG size scales with pixel count.
Frequently asked questions
How do you resize an image without distorting it?
Scale both dimensions by the same factor. To fit inside a bounding box, take the smaller of width ratio and height ratio: for a 4000 × 3000 image going into 1920 × 1080, that is 1080 ÷ 3000 = 0.36, producing 1440 × 1080. Applying the larger ratio would fill the box exactly but stretch the picture, which is the usual cause of squashed-looking photos.
Does resizing an image reduce its quality?
Downscaling discards pixels and is irreversible, but done properly it looks clean because each output pixel averages many input pixels. Upscaling is the damaging direction: enlarging invents detail that was never captured, so it always looks softer than the original. This tool refuses to enlarge unless percentage mode is used with a value above 100.
What image size should be used on a website?
Match the largest size the image will ever be displayed at, then account for high-density screens. A full-width hero on a 1440-pixel layout wants roughly 2880 pixels for a 2× display. A content image spanning 680 pixels wants about 1360. Serving a 4000-pixel photograph into a 680-pixel slot wastes roughly 97% of the bytes downloaded.
What is the difference between resizing and cropping?
Resizing scales the whole image to different pixel dimensions and keeps every part of the picture. Cropping removes area from the edges and keeps the remaining pixels at their original scale. Resizing changes how large the image is; cropping changes what the image contains. Changing aspect ratio without distortion requires cropping, not resizing.
Does resizing keep image transparency?
Transparency survives when the output format supports it. PNG and WebP both carry an alpha channel, so a transparent background stays transparent. JPEG has no alpha channel at all, so converting a transparent PNG to JPEG fills the transparent areas with white, which is why a logo saved as JPEG gains a visible box.
Are images uploaded when they are resized?
No. Each file is decoded with the browser's own image decoder, redrawn onto a canvas at the target size, and re-encoded using the browser's built-in codecs. Everything happens in the page. This site has no server-side code capable of receiving an image, so private photographs are never transmitted.
Sources
- Canvas 2D — drawImage and image smoothing — WHATWG HTML Standard
- Serve images in modern formats and correct sizes — Google web.dev
- createImageBitmap and EXIF orientation handling — Mozilla Developer Network
Last reviewed: · Formula and sources verified by Syed Aqeel Ahmad Gillani. See the methodology for how every calculation is derived.