What you can do
Convert between PNG, JPEG, and WebP. You can lower quality (for smaller JPEG/WebP files) and optionally shrink the longest side before export.
How it works (simple)
- The browser loads your image into an invisible
<canvas>element. - If you set a max width, the canvas is scaled down proportionally.
- The canvas is encoded to your chosen format (
image/png,image/jpeg, orimage/webp). - The encoded bytes become a downloadable file.
No server is involved — it is the same technique many image editors use for “Export as…”.
What runs in your browser
| Piece | Role |
|---|---|
| Canvas API | Draw the image and read pixels |
HTMLCanvasElement.toBlob | Produce PNG/JPEG/WebP bytes |
Learn more: Canvas API on MDN, toBlob reference.
Tradeoffs and limits
- Transparency: JPEG does not support transparency; converting a PNG with alpha to JPEG will flatten onto a background.
- Very large images: Huge dimensions can use a lot of memory; extremely large files may feel slow or fail on low-RAM devices.
- Quality slider: Only affects JPEG and WebP output.