# Image to WebP Converter

> Converts a PNG or a JPEG to WebP in this browser tab and reports exactly how many bytes it saved — or that it did not, which for small flat images is the honest answer. The decoding and the encoding both run on your own machine.

Use it: https://tessalor.com/en/image/image-to-webp

This tool runs entirely in the browser. Nothing entered into it is uploaded.

## How it is done

1. Read the first bytes of the file and decide what it actually is. A PNG begins with the signature 89 50 4E 47; a JPEG begins with FF D8 FF. The file name is never consulted, because a name is a claim.
2. Decode it to raw RGBA pixels — libpng for a PNG, mozjpeg for a JPEG, both compiled to WebAssembly and both running here rather than on a server.
3. Encode those pixels as WebP with libwebp at the chosen quality. With lossless on, quality is ignored entirely, because libwebp switches to a different encoder that reproduces every pixel exactly.
4. Compare the two file sizes and report the difference in whichever direction it went.

## Assumptions

- Quality is libwebp's own scale, not the browser's. The same number produces the same file in every browser, because the encoder ships with the tool rather than being borrowed from the engine.
- Lossless ignores the quality setting completely. That is libwebp's behaviour rather than a simplification made here.
- Colour profiles are not carried across. An ICC profile in the source is dropped and the WebP is written as plain sRGB, so a wide-gamut photograph comes out flatter than the original.
- Animated GIF, AVIF, HEIC, TIFF and SVG are not read. It takes a PNG or a JPEG, one file at a time, up to 32 MB.
- EXIF orientation is not applied, so a photograph a phone tags as rotated comes out in the orientation its pixels are actually stored in.

## Inputs

| Name | Label | Type | Default | Range |
| --- | --- | --- | --- | --- |
| `source` | Image file | file | chosen on your device | image/png, image/jpeg, up to 32 MB |
| `quality` | WebP quality | percent | 80 |  |
| `lossless` | Lossless | toggle | false |  |

## Outputs

- `webpSize` — WebP size (text), primary
- `saved` — Saved (text)

## Questions

### Is the image I convert uploaded anywhere?

No. The file is read in this browser tab and both the decoding and the encoding happen in a worker on your own machine. There is no server to send it to, and the automated test for this page asserts that no request leaves it while the tool is used.

### Why did my WebP come out larger than the original?

Because the WebP container and headers cost a fixed amount, and on a small or very flat image that overhead is more than the compression saves. It happens most with icons, screenshots of solid colour, and anything already well compressed. The tool says so rather than quietly reporting a saving, and on those files the right answer is to keep what you had.

### Should I choose lossless or lossy?

Lossy for photographs; lossless for anything with flat colour, sharp edges or text — logos, diagrams, screenshots. Lossless WebP typically beats PNG by twenty to thirty per cent on exactly that kind of image, and lossy WebP beats JPEG at a matched quality. Quality is ignored when lossless is on.

### What quality should I choose for a photograph?

Around 80, which is where libwebp's own documentation puts the useful part of the curve. Below about 60 the artefacts become visible on skin and sky; above about 90 the file grows quickly for a difference most people cannot see on a screen.

### Is WebP safe to use everywhere now?

In browsers, yes — Chrome, Firefox, Safari and Edge have all supported it for years. The remaining risk is other software: some desktop editors, email clients and content systems still will not open it, so keep the original if the file has to go somewhere that is not a web page.

## Sources

- [WebP Container Specification](https://developers.google.com/speed/webp/docs/riff_container) — Google, applies to 2011. Retrieved 2026-07-31.
- [RFC 6386 — VP8 Data Format and Decoding Guide](https://www.rfc-editor.org/info/rfc6386/) — IETF, applies to 2011. Retrieved 2026-07-31.
- [Portable Network Graphics (PNG) Specification, Third Edition](https://www.w3.org/TR/png-3/) — W3C, applies to 2025. Retrieved 2026-07-31.

---

Estimate, not advice. See https://tessalor.com/en/disclaimer.
Machine-readable catalogue: https://tessalor.com/api/tools.json
