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.
JPEG, PNG, WebP, HEIC, or AVIF · stays on this device
Output size appears here after you pick a file.
Steps
- 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.
- 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.
- 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. - 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.
- Before a file. “Waiting for an image.” Resize stays disabled.
- After you choose a file. “Ready: ” plus the file name, the pixel size when this tab can read it, and the input kilobytes. A file above 80 MiB prints that byte count and stays disabled.
- While it runs. “Resizing to {w}×{h} px…” {w} and {h} are the integers that will be written.
- When encode finishes. “Done: {sw}×{sh} → {w}×{h} px · {kb} KB {kind} ({bytes} bytes).” {kb} and {bytes} are measured from the result blob, not invented. HEIC, WebP, and AVIF add that the download is JPEG.
- This browser cannot open the file. JPEG/PNG/WebP: “Browser could not decode this image.” AVIF: “This browser could not decode AVIF.”
- Not an image this page reads. “This file is not a JPEG, PNG, WebP, HEIC, or AVIF this page can read.”
Limits
- 80 MiB in memory. 83,886,080 bytes. The whole file is read into the tab.
- 1 to 16,384 px on each edge. The same HEIC ceiling used on convert.
- Pixel size, not a KB cap. The status prints the real output bytes after encode. It does not search quality toward a number you type. That job is Compress to KB.
- JPEG quality is 0.92 for JPEG output. PNG is re-encoded as PNG at the new pixel grid. A photo that was already JPEG is re-encoded; the download is not the original bits.
- HEIC and AVIF become JPEG. Extra HEIC frames are dropped. AVIF has no extra decoder here.
- No account and no model for JPEG/PNG/WebP/AVIF. HEIC uses the same on-demand libheif download as convert. This page does not use the background-removal allowance.
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
- CanvasRenderingContext2D.drawImage() on MDN — the resample call.
- imageSmoothingQuality on MDN — set to
highwhen the browser exposes it. - HTMLCanvasElement.toBlob() on MDN — PNG or JPEG encode after resample.
- Blob on MDN —
blob.sizeis the byte count the status prints, divided by 1024.