Image compressor and HEIC to JPG

Resize and re-encode a picture in the browser, including iPhone HEIC files decoded locally.

Runs locally in your browser. Nothing is uploaded.

JPEG, PNG, WebP, or HEIC. Each file stays on this device. Limit 25 MB and 50 million pixels.

Lower quality makes a smaller file.

How to compress an image

Choose one or more JPEG, PNG, WebP, or HEIC files. Pick an output format, a quality, and the longest side in pixels. The page decodes the file, draws it to a canvas at the chosen size, and encodes a new file for you to download. The original stays where it was. The download is a new blob created in memory.

JPEG and WebP are lossy. A quality around 80 keeps most photographs looking clean and cuts the file a lot. Lower it when the picture is a thumbnail or a social preview. PNG is lossless, so the quality slider does not apply. A photograph saved as PNG often gets larger. Use PNG when the image is a diagram, a screenshot with flat color, or anything that must not pick up compression blocks.

The longest-side control is how you resize. A 4000 pixel phone photo limited to 1920 pixels on the long edge is enough for a blog post and much smaller to ship. Leave the size at “Original” when you only want a lighter encoding. Canvas dimensions are rounded to whole pixels, and the aspect ratio is kept.

HEIC to JPG

Photos from recent iPhones are often HEIC. Many desktop browsers cannot decode that format with the built-in image decoder. When the file type or the .heic or .heif name says it is HEIC, this page loads a local libheif decoder and turns the first picture into pixels, then encodes the JPEG, WebP, or PNG you asked for. That decoder is a WebAssembly build packaged inside a script from this site. It is downloaded only when you open a HEIC file. A JPEG or PNG never triggers it. The photo bytes are passed to that local decoder. They are not posted to an upload API.

Re-encoding drops the metadata the canvas does not keep, including a typical location tag. That is useful when you do not want a photo’s GPS data in the file you publish. If you needed the original metadata, keep the original file.

Common questions

Why did the file get bigger?

PNG and a high WebP or JPEG quality can exceed a file that was already compressed. Try JPEG or WebP at a lower quality, or shrink the long edge. Screenshots with large flat areas still prefer PNG.

Will this work offline?

After the page script is loaded, JPEG, PNG, and WebP stay on the device. The first HEIC file in a session also needs the decoder chunk from this site. Later HEIC files in that session reuse it. Nothing about the picture is uploaded either way.

Can I convert a whole album?

Select several files. They are processed one after another so a large photo does not have to share the canvas with the next one. There is a 25 MB cap per file so a single huge image does not freeze the tab.

Which format should I publish?

WebP or JPEG for photographs, PNG for graphics with sharp edges and text. HEIC is a fine camera format and a poor format to hand to visitors, because support is uneven. Convert it to JPEG when the audience is a normal web page.