JPG to WebP Converter
- Writing the WebP discards picture detail to save space, and what it discards does not come back.
- The JPG was already compressed once. This step compresses the picture a second time, and going back does not undo either.
- The Exif data, the colour profile and anything else the original carried are not passed on: the picture is decoded to plain pixels and a new file is written from them.
Needs JavaScript. Runs only here.
This page turns a JPG into a WebP on your own machine. Every conversion on this page runs in your browser. The picture is read, drawn and written on your own machine, and the file is not sent to a server.
Going the other way? Convert WebP back to JPG →
How do you convert a JPG to a WebP?
A WebP usually stores the same picture in fewer bytes than a JPG of it. The saving is real and it is paid for: the picture goes through a lossy encoder a second time.
- Choose the JPG file you want to convert. It is read inside this page, on your own machine.
- Set the quality between 0 and 1. A lower setting writes a smaller file and throws more detail away, and no two browsers read the number the same way.
- Select Convert to WebP. The page reads the first bytes of what came back and refuses the file if they are not WebP.
- Download the WebP. Nothing has been sent anywhere, so the file is ready as soon as it is written.
What Changes From JPG to WebP
JPG to WebP usually produces a smaller file of the same picture, and it compresses that picture a second time: the JPEG artefacts are carried in as pixels and then re-encoded.
Each row below is one property of the picture: what it is in the JPG, what it becomes in the WebP, and whether it survives the trip. Convert a file and the same rows fill in with the measurements from your own picture.
| Property | In the JPG | In the WebP | Verdict |
|---|---|---|---|
| Dimensions | as the file has them | as the file has them | kept |
| Colour model and bit depth | Y'CbCr, 8 bits per channel | RGB with alpha, 8 bits per channel — 8 bits per sample, whatever the source held | changed |
| Alpha channel | none — JPEG defines no alpha channel | none — WebP can carry one, this picture has nothing to put in it | not gained |
| Colours used | up to 16,777,216 | the same pixels | kept |
| Animation frames | 1 | 1 | kept |
| Metadata (Exif, ICC) | present in the file | dropped — a new file is written from pixels | lost |
| Compression | lossy, discrete cosine transform (the baseline process) | lossy, in a VP8 chunk | changed |
| File size | the file you chose | usually smaller | changed |
the pixels survive; some of the detail and the Exif data do not.
Going Back to JPG
Converting back does not restore what this step dropped, so convert the WebP result back to JPG only when you need a JPG file.
The change above runs one way — go back from WebP to JPG writes a new file, not the original.
What Travels With the Picture
What the two formats are, and what the browser does with a picture on the way between them. None of this depends on which JPG you bring.
How JPG and WebP Are Defined
| Property | JPG | WebP |
|---|---|---|
| Compression | lossy, discrete cosine transform (the baseline sequential process); the standard also defines a separate lossless mode that web .jpg files do not use | two modes in one container: lossy in a VP8 chunk, lossless in a VP8L chunk |
| Alpha channel | none - neither T.81 nor JFIF defines an alpha or transparency channel | yes, in both modes - a lossy file carries its alpha in a separate ALPH chunk, and a lossless file carries it inside the VP8L chunk |
| Animation | none - one image per file | yes - controlled by the ANIM and ANMF chunks in the extended file format |
| In one sentence | JPEG saves space by throwing detail away. The baseline process, which is what a .jpg file on the web uses, is lossy and cannot be undone, and the standard defines no transparency at all. | WebP has two modes in one container. Lossy WebP throws detail away the way JPEG does; lossless WebP keeps every pixel. Either mode can carry transparency, and the container can also hold an animation. |
- A JPG file begins FF D8 (SOI); a JFIF file follows it with FF E0 and the identifier 4A 46 49 46 00.
- A WebP file begins 52 49 46 46 ("RIFF"), then a four-byte size, then 57 45 42 50 ("WEBP").
- JPEG is defined by ITU-T Rec. T.81 | ISO/IEC 10918-1 (JPEG); ITU-T Rec. T.871 | ISO/IEC 10918-5 (JFIF).
- WebP is defined by WebP Container Specification (Google); the bitstreams are RFC 6386 (lossy) and the WebP Lossless Bitstream Specification.
JPEG and lossy WebP save space by discarding picture detail, and what they discard does not come back. PNG, BMP and lossless WebP keep every pixel they are given, and GIF keeps every pixel it is left with after the palette has been applied.
Every save as JPEG compresses the picture again. A JPEG that has been converted and saved once more carries the loss from both steps, and the second one cannot be undone by going back.
WebP has a lossy mode and a lossless mode, and both can carry transparency. Lossy WebP discards detail the way JPEG does; lossless WebP keeps every pixel.
Converting a picture back to the format it came from does not return the original file. Whatever a step discarded stays discarded, and the return trip writes a third file.
The browser decodes the picture to plain pixels and writes a new file from them, so the Exif data, the colour profile and anything else the original carried are not passed on.
Whether a browser can be asked for lossless WebP from a canvas is not settled. The specification gives only a quality number for formats with variable quality and names no lossless option, and Safari does not write WebP from a canvas at all.
The only formats browsers are documented as writing from a canvas are PNG, JPEG and WebP. Safari does not write WebP from a canvas at all. GIF, BMP and ICO appear nowhere in the compatibility data.
A canvas holds pixels and nothing else, so a file written from one carries no Exif data, no thumbnail and none of the original file's other metadata. The canvas specification never mentions Exif; this follows from writing the file out of a bitmap.
The quality setting applies only to formats that support variable quality, never to PNG, and it has to be a number between 0 and 1. Browsers read it differently, so the same setting does not give the same file everywhere.
What Changes the WebP File Size?
The quality setting
It decides how much detail the encoder may drop, and it is the control with the largest effect on the result. The quality setting applies only to formats that support variable quality, never to PNG, and it has to be a number between 0 and 1. Browsers read it differently, so the same setting does not give the same file everywhere.
What the picture itself decides
Flat colour, wide gradients and repeated texture compress well; fine grain, noise and sharp text do not. Two pictures at the same setting can differ several times over in the bytes they need.
What the JPG brings with it
Whatever the earlier JPEG pass left behind. Blocking and ringing arrive as pixels like any other, and the WebP encoder spends bytes on them because it cannot tell them apart from the picture.
Common Mistakes
- Quoting a size saving in advance. It depends on your picture, and no figure here would be true of the next one.
- Expecting a transparent background. A JPG has none to give, and WebP does not invent one.
- Converting an archive copy. Keep the original where the picture matters; this step compresses it a second time.
Frequently Asked Questions
How much smaller is a WebP than the JPG it came from?
It depends on the picture and on the setting, so this page measures rather than promises. Convert your own file and the transfer table prints both sizes.
Which browsers can display a WebP image?
Every current browser displays one. Writing a WebP is the narrower question, and this page tests it before offering you the button.
Does converting a JPG to WebP compress the picture twice?
Yes. JPG to WebP usually produces a smaller file of the same picture, and it compresses that picture a second time: the JPEG artefacts are carried in as pixels and then re-encoded.
Can a WebP made from a JPG have a transparent background?
Not from the conversion. WebP carries an alpha channel in both of its modes, but a JPG has nothing to put in it, so every pixel comes out opaque.
You can, but the round trip is not the file you started from: the WebP to JPG direction.
Related Conversions
The rest of the family sits on the image conversion index.