Skip to main content
IR

Image Resizer

Resize any image to an exact width and height in your browser — optional aspect-ratio lock, PNG/JPEG/WebP output, nothing uploaded.

Did you like the tool? Thanks!
Share:

More Image Tools Tools

IC

Image Cropper

Crop any image to exactly the area you need, with a live preview — nothing is uploaded, everything happens in your browser.

IC

Image Compressor

Shrink an image's file size by re-encoding it at a chosen quality level — live before/after size comparison, JPEG/WebP/PNG output, done locally.

IF

Image Flip & Rotate

Flip an image horizontally or vertically and rotate it by any angle — quick 90/180/270° buttons or a free-angle slider, corners never clipped.

IT

Image to Base64

Convert an image into a Base64-encoded string — full data URI or raw Base64, character count, one-click copy, all done locally.

BT

Base64 to Image

Paste a Base64 string or data URI and preview the decoded image instantly — auto-trims whitespace, lets you pick the assumed format, download in one click.

PI

Placeholder Image Generator

Generate a simple placeholder image for wireframes and mockups — custom size, colors and text, auto-sized to fit, PNG/JPEG/WebP output.

IF

Image Format Converter

Convert an image between PNG, JPEG, WebP and BMP entirely in your browser — no upload, instant preview, adjustable quality.

FG

Favicon Generator

Turn any image into a complete favicon package — six PNG sizes plus a combined multi-resolution .ico file, generated locally in your browser.

AA

ASCII Art Generator

Turn a photo into text-based ASCII art, or type a short message as a large block-letter banner — both rendered entirely in your browser.

QC

QR Code Generator

Generate a real, scannable QR code from text, a URL, Wi-Fi details, an email address or a phone number — encoded entirely in your browser, no external API.

Original size: ×px. Everything processes locally in your browser — nothing is uploaded.

Dimensions above 8000px on either side are rejected — very large canvases can hang or crash a browser tab. Setting a width or height larger than the original (upscaling) works, but stretches existing pixels rather than adding real detail, so quality can noticeably drop.

How to Use Image Resizer

Choose an image, then type the width and height you want in pixels. Leave "Lock aspect ratio" checked and changing one dimension automatically recalculates the other to match the original image's proportions, or uncheck it to stretch the image to any exact size you like. Pick PNG, JPEG or WebP as the output format, then click download. The preview canvas always shows exactly what the downloaded file will look like.

About Image Resizer

Resizing an image sounds like a single operation, but it actually involves a choice most people never think about explicitly: what happens to every pixel of the source image when the output has a different number of pixels than the input. A resize is really a resampling operation — the browser has to calculate a brand new grid of pixel values from the old grid, and the quality of that calculation depends entirely on the resampling algorithm used. The HTML5 canvas element, which this tool is built on, handles this automatically through its `drawImage()` method: when you draw a source image into a destination rectangle of a different size, the browser applies bilinear (or, on most modern browsers, a higher-quality bicubic-like) interpolation to blend neighbouring source pixels into each destination pixel, rather than simply duplicating or discarding pixels outright. This is what makes a resized photo look smooth rather than blocky. There are two fundamentally different directions a resize can go, and they behave very differently. Downscaling — making an image smaller, say from 4000×3000 down to 1200×900 — is the easier, more forgiving direction: many source pixels are being averaged down into fewer destination pixels, so detail is lost but the result still looks sharp and clean, because there was more information available than the output needs. Upscaling — making an image larger than its original dimensions — is the harder direction: the browser has to invent pixel values that were never actually captured by a camera or a sensor, by interpolating between existing pixels. No amount of clever interpolation can recover detail that simply isn't in the source data, so an upscaled image will always look softer, blurrier, or more artificial than a photo actually captured at that resolution — this is a fundamental limit of resizing, not a bug or a limitation specific to this tool. This tool allows upscaling because there are legitimate reasons to do it (matching a required output size for a form, a print template, or a platform upload requirement), but it's worth setting expectations: quality genuinely degrades in that direction, and there's no setting or algorithm that avoids it. Keeping the aspect ratio locked while resizing is the safest default for almost any image containing real photographic content, because deliberately changing the width-to-height ratio stretches or squashes every object in the frame — faces get wider or narrower, circles become ovals, buildings tilt in ways that look obviously wrong to a viewer. There are legitimate reasons to unlock it anyway: fitting an image into a fixed banner or thumbnail slot with an unusual aspect ratio, or deliberately creating a stretched effect for design purposes. This tool supports both: lock it for safe, proportional resizing, or unlock it to type in any width and height combination directly. Because everything happens on an HTML canvas element running JavaScript directly in your browser, no image data is ever transmitted anywhere. The file you choose is read locally with the FileReader API, drawn onto an in-page canvas, and the resized result is only ever written to disk when you explicitly click download — there is no upload step at any point in the process.

Details & Tips

How this tool actually resizes an image: once a file is chosen, it's loaded into a browser `Image` object and its natural width and height are recorded as the "original size". The width and height fields default to that original size. When you type a new width with "Lock aspect ratio" checked, the height field is recalculated as `Math.round(newWidth * (originalHeight / originalWidth))`; typing a new height instead recalculates the width the same way in reverse. Because both dimensions round to the nearest whole pixel independently, going width → height → width again can occasionally shift the final number by a single pixel compared to the very first value — this is an expected, harmless side effect of rounding twice, not a bug, and stays within ±1px of the mathematically exact aspect ratio. Worked example: a 1600×900 photo (a 16:9 ratio, or 0.5625 height-per-width) has its width field changed to 1000. The tool computes `1000 × 0.5625 = 562.5`, which rounds to 563, so the height field updates to 563 automatically. If you then typed 562 into the height field directly instead, the width would recompute as `562 ÷ 0.5625 ≈ 999`, one pixel off from the original 1000 — again, an expected consequence of two independent rounding steps, not an error. Once a valid width and height are set, the resize itself is one `drawImage()` call: the canvas element is set to exactly the target width and height, and the source image is drawn scaled into that full canvas area in a single operation — this is what triggers the browser's built-in bilinear/bicubic resampling described above. Because a canvas with an enormous pixel count can be slow to allocate and can hang or crash a browser tab (a risk that scales with width × height, not just either dimension alone), any width or height greater than 8000px is rejected outright with an inline message rather than attempted — this cap is checked on every change, before the canvas is touched. The output format select controls only the final `canvas.toBlob()` export step, not anything about how the resize itself is calculated: PNG preserves transparency and is lossless (larger files, exact pixels), JPEG discards transparency and compresses lossily at a fixed quality, and WebP offers both lossy and lossless modes with generally smaller file sizes than either at comparable visual quality. If your source image has transparency and you need to keep it, choose PNG or WebP — JPEG has no alpha channel and will flatten transparent areas onto a solid background (typically white or black depending on the browser). Upscaling — setting either dimension larger than the original — is allowed and processed with the exact same `drawImage()` call as any other resize; no special handling or extra processing is applied. The practical effect, as covered above, is that the browser is interpolating pixels that don't actually exist in the source, so the result will look progressively softer the further you scale up. Doubling a 500×500 image to 1000×1000, for instance, typically still looks acceptable at normal viewing sizes, while pushing a small thumbnail up to many times its original size will show visibly soft, blurred detail no interpolation algorithm can fully hide.

Frequently Asked Questions

How does "Lock aspect ratio" work?
It records the height-to-width ratio of your original image, then whenever you change one dimension it automatically recalculates the other as newValue × ratio (rounded to the nearest pixel), so the resized image keeps the same proportions as the original.
Why did the width change slightly after I typed a height?
Both fields round independently to the nearest whole pixel, so switching between typing width and height can shift the other value by about ±1px. This is an expected effect of rounding twice, not an error — the aspect ratio stays visually correct.
Why is there a maximum size of 8000px?
A canvas with an extremely large pixel count (width × height) can take a long time to allocate and, in the worst case, hang or crash the browser tab. Capping either dimension at 8000px keeps the tool responsive and safe for any image.
Can I make an image bigger than its original size?
Yes, upscaling is allowed. The browser interpolates new pixel values between the existing ones, but since it cannot invent detail that was never captured, the result will look softer than a photo actually taken at that resolution — expect a visible quality drop the further you scale up.
What's the difference between the three output formats?
PNG is lossless and keeps transparency, at a larger file size. JPEG compresses lossily and has no transparency, flattening any transparent areas onto a solid background. WebP supports both lossy and lossless modes and is generally the smallest of the three at similar visual quality.
Will resizing distort my image if I uncheck aspect ratio lock?
Yes — with the lock off, you can type any width and height combination, and the image is stretched or squashed to fit exactly, which will noticeably distort faces, circles, and straight lines unless the new ratio happens to match the original.
Does this tool upload my image anywhere?
No. The file is read locally with the browser's FileReader API and resized on an in-page canvas element; nothing is sent to a server at any point, including when you click download.
Why did I get an error saying "Please choose an image file"?
This tool only accepts files whose browser-reported MIME type starts with image/. Non-image files (documents, videos, etc.) are rejected immediately with this message rather than attempting to process them and failing unpredictably later.
What resampling method does the resize use?
It relies on the browser's native canvas drawImage() scaling, which applies bilinear or (on most modern browsers) a smoother bicubic-like interpolation automatically — there is no separate algorithm choice, since this matches how canvas-based resizing works across the web platform.
Can I resize an image that has transparency?
Yes — choose PNG or WebP as the output format to preserve transparent areas. JPEG has no alpha channel, so any transparency will be flattened onto a solid background if you choose JPEG output.
Does the preview show the exact result I'll download?
Yes — the canvas shown on the page is drawn at your exact target width and height (displayed scaled down visually if it's wider than the page, via CSS), and the download button exports that same canvas directly.
What happens if I enter 0 or a negative number?
The tool checks that both width and height are at least 1px before attempting a resize; anything below that shows an inline message asking for a valid size instead of drawing a broken or empty canvas.

Also Available As

image resizer, resize image online, resize photo pixels, change image dimensions, resize image without losing quality

Found a Problem?

Let us know if something with Image Resizer isn't working as expected.

Thanks — we'll take a look.