Pixels

Resize image

Set a width, a height, or a long-edge pixel size. JPEG, PNG, and WebP resample in this tab. HEIC uses libheif. The status prints the real output bytes after encode. This page does not hit a KB cap.

Guide: Resize a photo to a pixel size. Related: Compress to KB · HEIC to JPG · WebP to JPG · Remove EXIF · PNG to JPG · attachment KB caps.

All guides

Drop a photo

JPEG, PNG, WebP, HEIC, or AVIF · stays on this device

Resize mode

Output size appears here after you pick a file.

Waiting for an image.
Original
Resized

Steps

  1. Drop a JPEG, PNG, WebP, HEIC, or AVIF, or click the zone and choose one. Resize stays disabled until a file is chosen. Choosing a file only reads it into this tab. Files above 80 MiB (83,886,080 bytes) are refused. Each edge must be 1 to 16,384 px.
  2. Type a width and height, or switch to Long edge and type one pixel size for the longer side. Keep aspect is on by default, so one edge fills the other. Unlock it only if you intend to stretch.
  3. Press Resize. JPEG, PNG, and WebP decode with this browser. HEIC loads libheif-js from /assets/libheif/ on that press. AVIF uses the browser decoder; if this tab cannot open it, the page stops. The photo is not uploaded.
  4. Read the status line. It prints input pixels, output pixels, and the measured byte size of the download. PNG stays PNG. JPEG, WebP, HEIC, and AVIF download as JPEG at quality 0.92. Then download from a local blob: URL.

How it works

Choosing a file reads it into memory in this tab, up to 80 MiB (83,886,080 bytes). Nothing is posted to LocalPix. Resampling is canvas.drawImage with imageSmoothingQuality set to high when the browser exposes it. New pixels are interpolated. This page does not invent photographic detail, and it does not search JPEG quality for a kilobyte cap. A named KB or MB cap is a second step on Compress to KB.

JPEG, PNG, WebP. This browser decodes the still. PNG downloads as PNG so alpha stays. JPEG and WebP download as JPEG at quality 0.92, the same encode as convert. WebP animation becomes one still. Canvas JPEG has no alpha and no EXIF.

HEIC. The first still is decoded with libheif-js 1.23.5 (1,463,506 bytes, LGPL-3.0) from /assets/libheif/, the same decoder as HEIC to JPG, then resampled and written as JPEG at quality 0.92. libheif loads on Resize, not on file pick. Accepted brands are heic, heix, hevc, hevx, mif1, and msf1. Live Photo motion and extra stills are not in the download.

AVIF. Decode uses this browser. There is no fallback decoder. If decode fails, the status says so and the file stays on disk. A still that this browser can open downloads as JPEG at quality 0.92. Convert-only is also on AVIF to JPG.

GIF, TIFF, BMP, and other containers are refused. Upscaling is allowed; the extra pixels are interpolated. Same-size runs still re-encode.

What the status line says

Read this line before you send the file. Kilobytes are blob.size / 1024, one decimal place. The download name ends in -{width}x{height} plus the output extension.

Limits

FAQ

Does my photo leave the device?

No. Resample runs in this tab. The download is a local blob URL. HEIC may GET libheif from /assets/libheif/; that request is the decoder, not your photo. Verify local · 0-byte upload proof.

Will this hit 100 KB?

No. This page changes pixel width and height. File size is whatever the encode produced, printed on the status line. Type 100 on Compress to KB after you have a JPEG if a form named that cap. Guide: attachment caps.

Which formats actually resample?

JPEG, PNG, and WebP decode in this browser and resample on a canvas. HEIC decodes with libheif and writes JPEG. AVIF resamples only if this browser can decode it. GIF, TIFF, and BMP are refused.

Does Keep aspect crop the photo?

No. Keep aspect scales both edges so the ratio matches the original. There is no crop handle on this page. Unlock aspect only if you intend to stretch.

Does this use the background-removal quota?

No. JPEG/PNG/WebP/AVIF resize does not download ormbg. HEIC downloads libheif the same way HEIC to JPG does. Neither path spends the cutout allowance.

Can I enlarge a small photo?

Yes. Edges up to 16,384 px are accepted. New pixels are interpolated. The page does not restore detail that was never in the file.

Sources