How-to
Resize an image to exact pixel dimensions
When a portal requires a 400x400 profile picture or a print lab specifies exactly 1200x1800 pixels, guessing won't cut it. Here is how to set exact width and height dimensions in your browser without uploading your files to any remote server.
Step by step
- Open the image resizer and add your file. Check its original dimensions in your local image viewer if you need them; the tool does not display a separate original-dimensions readout. Choose exact dimensions to set a bounding width and height. With the ratio lock enabled, the output fits inside that box while preserving the source proportions; it does not automatically crop the image to a new ratio.
- Enter the target width and height. For a profile picture, a common requirement is 400x400 or 1000x1000. For a web banner, typical values are 1200x628 for social sharing or 1920x1080 for a full-width header. If you type only one dimension and leave the lock active, the other adjusts to avoid distortion.

- Download the resized image and verify the pixel count in your file manager or image viewer before uploading it anywhere. The resizer processes everything in your browser: your original file never leaves your device, and the resized copy is ready to save the moment the operation completes.

When to lock the ratio and when to override it
Image Resize includes fit modes such as Cover and Contain with color or blurred backgrounds, alongside ready-made social media dimension presets. These options prevent distortion when converting between different aspect ratios entirely on your device.
| Feature | Passport / ID (300 DPI) | Instagram Square / Story | Web Hero Banner |
|---|---|---|---|
| Reference | 600x600 px (US) / 413x531 px (EU) | 1080x1080 px / 1080x1920 px | 1920x1080 px / 2560x1440 px |
| Size | Exact 1:1 or 35:45 Ratio | 1:1 or 9:16 Vertical | 16:9 Widescreen |
| File size cap | ≤ 240 KB (Portal Limit) | ≤ 8 MB (Meta API) | ≤ 500 KB (PageSpeed CWV) |
| Scope | Government Visas / Passports | Mobile Feed / Reels / TikTok | Desktop & Mobile Displays |
Keeping quality when you resize down
Downscaling (making an image smaller) almost always looks good. Upscaling (stretching a small image to a larger canvas) introduces softness because the missing pixels have to be invented. If you need to upscale for print, use the highest-quality original you have and accept that the result will look softer than a natively higher-resolution source. The resizer never leaves your device: no upload, no queue, and the result is immediately available to save.
| Feature | Center Crop (Fill) | Canvas Pad (Fit / Letterbox) | Stretch (Distort) |
|---|---|---|---|
| Reference | Fills Canvas, Trims Edges | Maintains Aspect, Adds White | Alters Proportions / Distorts |
| Best for | Avatars & Hero Headers | Product Catalogs & Visas | Avoid (Distorts Faces) |
| Processing mode | @jsquash/resize Lanczos-3 (Crop) | @jsquash/resize Lanczos-3 (Pad) | @jsquash/resize Lanczos-3 (Stretch) |
| Result | Clean Edge Without Black Bars | Full Subject Preserved | Stretched / Squashed Proportions |
Aspect ratios, resampling, and what happens to pixels
Forcing an image into a target size that does not match its original aspect ratio will distort it unless you crop or pad the canvas first. Aspect ratio is the proportional relationship between width and height: a 1920x1080 image has a 16:9 ratio, and resizing it to 500x500 without cropping compresses the horizontal axis by a different factor than the vertical, visibly squashing the content. When resizing pixels, the resampling algorithm determines sharpness: nearest-neighbor copies single pixels (blocky), bilinear averages four neighbors (softer), bicubic samples a 4x4 grid, and Lanczos-3 applies a sinc-based kernel over a wider neighborhood for crisp downscaling. Unlike basic Canvas drawImage passes, this resizer runs Lanczos-3 resampling in WebAssembly (@jsquash/resize) directly in your browser.
The tools used in this guide
- Resize imagesResize images by dimensions or percentage, then export JPG, PNG, WebP or AVIF in your browser.
- Compress imagesBatch compress JPG, PNG, WebP, and AVIF images by quality slider or exact target KB size.
- Crop imageCrop an image with a free rectangle or preset aspect ratio, preview the selected area and download the result.
- Social Post MakerCreate news cards, quotes, carousels, and social media visuals in 4:5, 1:1, 9:16, and 16:9 locally in your browser.
- Instagram Carousel & Grid SplitterSplit wide panoramic photos into 2 to 10 swipeable Instagram or LinkedIn carousel slides, or slice a 3×1, 3×2, or 3×3 profile grid locally in your browser.
- Quote Card & Testimonial MakerCreate book excerpt cards with pastel word highlights, 5-star customer review graphics, minimal quotes, and podcast waveform cards locally in your browser.
Frequently asked questions
Can I resize without losing quality?
Downscaling to a smaller size does not degrade quality in a visible way: you are keeping the best pixels and discarding the surplus. Upscaling is a different story: you are asking the algorithm to invent data that was never there. For web use, resize to the exact display size so the browser never has to scale the image itself, which gives the sharpest result at the lowest file size.
What if the site says my image is the wrong size after I upload it?
The most common cause is that the platform recompresses the upload and applies its own resize, landing on slightly different dimensions. Check what the platform actually needs (its help page usually states the exact pixel count) and set those values before resizing. Some platforms also expect a specific aspect ratio rather than absolute pixels, so check both.