# Image Resizer

URL: https://hifreetools.com/image/image-resizer

> Resize an image to exact pixel dimensions or a percentage, keeping the aspect ratio if you want. Pick the output format and download — all in your browser.

## Quick answer

To resize an image, set the target width and height in pixels (or scale by a percentage) and re-export it. This tool does that in your browser: it locks the aspect ratio by default so the image doesn't stretch, lets you output JPG, PNG, or WebP, and downloads the result. Your image is never uploaded.

The tool loads your image, then draws it onto an HTML canvas sized to your chosen dimensions, which scales the pixels. With 'lock aspect ratio' on, changing the width auto-sets the height (and vice-versa) using the original ratio, so the picture is never distorted. It then exports the canvas in your chosen format.

## Examples

- Profile picture: Resize to 400 × 400px → 400 × 400 image
- Halve a photo: 4000 × 3000 at 50% → 2000 × 1500
- Fit a web banner: Set width 1200px, ratio locked → 1200 × auto height

## FAQ

**Is my image uploaded to resize it?**
No. Resizing happens entirely in your browser on an HTML canvas, so your image never leaves your device.

**What does 'lock aspect ratio' do?**
It keeps the image's original proportions: when you change the width, the height updates automatically (and vice-versa) so the picture isn't stretched.

**Can I make an image larger?**
Yes, but enlarging beyond the original size can't add detail, so the result looks softer or blocky. Resizing down keeps quality.

**Which output format should I choose?**
Keep PNG for graphics and transparency; use JPG or WebP for photos. WebP gives the smallest file at good quality.

**Does resizing also reduce the file size?**
Usually yes — fewer pixels means a smaller file. For photos, lowering the quality slider reduces it further.

**How do I crop instead of resize?**
This tool resizes (scales) the whole image. To crop, use the Crop Image tool first (or any editor), then resize here to the exact pixels you need.


## Sources

- [MDN — CanvasRenderingContext2D.drawImage() (scaling)](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)
- [Google web.dev — Choose the right image format](https://web.dev/articles/choose-the-right-image-format)

Runs in the browser; nothing is uploaded. Cite as: HIFreeTools, "Image Resizer", https://hifreetools.com/image/image-resizer
