Image Size Converter

Resize JPG, PNG, and WebP to exact pixel dimensions.

published

  • [FREE]
  • [NO_SIGNUP]
  • [NO_UPLOAD]

An image size converter resizes JPG, PNG, and WebP to exact pixel dimensions. This tool uses Lanczos-3 sampling for sharp output, locks aspect ratio when you want, and runs entirely client-side so files never leave your browser tab.

Need to change format as well (JPG → WebP, PNG → JPG, etc.)? Pair this with the Image Format Converter — same codecs, same privacy posture, lossy/lossless toggles per format. Resize here first, convert there second (or use the All to WebP option below to do both in one pass).

How to use the image size converter

  1. Drop files into the zone. JPG, PNG, and WebP are accepted; other types show an error on that row but do not stop the batch.
  2. Pick target dimensions. Type a width and height, or click a preset chip (HD 1920×1080, 720p 1280×720, Square 1080, Story 1080×1920, 800×600, 512×512, 256×256). Toggle the padlock to keep the W:H ratio when you change one of them.
  3. Choose a fit mode. Cover (default), Contain, or Stretch. See the next section for what each does.
  4. Quality + format. The Quality slider applies to JPG and WebP output. PNG output is always re-encoded losslessly. Pick Keep original to stay in the source format, or All to WebP to convert everything.
  5. Resize all. Each row in the list shows the target dimensions and warns “will stretch” or “will crop to fit” when the source aspect differs from the target.
  6. Download. Save individual files or grab a ZIP of everything.

Fit modes: Cover, Contain, Stretch

The tool offers three ways to map a source image onto your target box. The default is Cover.

Cover — fills the exact target dimensions. If the source aspect differs from the target, the overflow is center-cropped. No distortion, no padding. Example: target 1280×720 (16:9), source 4000×3000 (4:3) → the image is scaled until its height matches 720, then 320 px is shaved off each side, leaving exactly 1280×720.

Contain — scales the image to fit fully inside the target box, preserving the source aspect ratio. The output may be smaller than the target on one axis. No cropping, no stretching, no padding. Example: target 1280×720, source 4000×3000 (4:3) → output 960×720; the height fills the box, the width follows the 4:3 aspect.

Stretch — forces the exact target dimensions. If the source aspect differs, the image is distorted to fit. Use only when you know the source and target share an aspect ratio (or when you actually want the distortion).

If the source and target share the same aspect ratio, all three modes produce the same result.

Common target sizes

  • Web hero: 1920×1080 or 1600×900.
  • Social card (Twitter/Facebook/LinkedIn share): 1200×630.
  • YouTube thumbnail: 1280×720.
  • Instagram square: 1080×1080.
  • Email-friendly attachment: 1024 on the longest side.
  • Avatar/profile: 512×512 or 256×256.

Type any of these into the dimension boxes; the tool handles the rest.

Why Lanczos-3 matters

The browser’s built-in canvas drawImage uses fast but coarse resampling (typically bilinear). It is fine for thumbnails on the page, but the output looks softer than the source. Lanczos-3 is a higher-order kernel that preserves sharp edges and fine detail at the cost of more CPU. The tool runs it in WebAssembly — the difference is invisible on small images and very visible on large ones with fine text or detail.

Quality vs file size

For JPG and WebP outputs, the Quality slider trades visual quality for byte size:

  • 95–100: visually indistinguishable from the source, but barely smaller than the original.
  • 85–90: visually lossless to the human eye in almost all cases. Default value of 85 is a good baseline.
  • 70–85: noticeable compression artifacts only on close inspection. Best for web bandwidth.
  • Below 70: visible artifacts.

PNG output ignores the slider — PNG is always re-encoded losslessly.

Privacy

Same posture as the other tools: a static HTML page that loads its JavaScript and WebAssembly from this domain, and runs everything in your browser tab. The Network tab in DevTools confirms it — once the codecs load, no further requests fire. There is no upload, no temporary cloud storage, no analytics on file content.

How it compares

bytefork.toolssquoosh.appiloveimg.com
Runs in browser✗ (uploads to server)
Lanczos-3 resamplingunspecified
Batch processingpartial (one at a time)
Aspect-ratio lock toggle
Sign-in requiredfor >2 files
Ad-free

Frequently asked questions

How does aspect-ratio lock work?

When the padlock is closed, changing either the width or the height updates the other to keep the W:H ratio you set when you toggled the lock. The lock controls only the target dimensions you type — what happens at resize time is decided by the Fit mode (Cover, Contain, or Stretch).

What are Cover, Contain, and Stretch?

Three fit modes. Cover (default) fills the exact target dimensions and crops the overflow — no distortion. Contain scales the image to fit fully inside the target box and keeps its aspect ratio — the output may be smaller than the target on one axis. Stretch forces the exact target dimensions and distorts the image if the source aspect differs.

Does my image leave my browser?

No. Decode, resize, and re-encode all happen client-side using WebAssembly codecs. Open DevTools → Network — after the codecs download (once), no further requests fire. Your images stay on your device.

Which resampling algorithm does it use?

Lanczos-3, via the jsquash WASM port. It is the same algorithm used by professional image tools and gives sharp downscales without the blurry look you get from default browser resampling.

Can I upscale images?

Yes — set a target larger than the source. Quality will degrade because no new detail is invented; Lanczos-3 just interpolates smoothly. For best results, never upscale by more than 2× and avoid upscaling JPGs that are already compressed.

Will the output be smaller in bytes?

Usually yes, because the resized image has fewer pixels. The Quality slider controls JPG/WebP byte size on top of that. PNG keep mode is lossless re-encoding, so very simple images may stay the same size.

What happens to image metadata (EXIF, ICC profile)?

Stripped. The decode-then-re-encode pipeline does not preserve EXIF, GPS, or ICC color profiles. If you need those, do not resize with this tool — they will be lost.

How big can the batch be?

Limited by browser memory. A dozen 10-megapixel photos resize cleanly on a typical laptop. Hundreds of files in one batch may slow the page; split them in that case.

Why does the first resize feel slow?

The resize codec and each format codec (JPEG, PNG, WebP) are WebAssembly modules that download and initialize on first use. After the first file of each format, every subsequent resize is fast.