JPG to AVIF: Measured Sizes, and When the JPEG Stays
Images··7 min read
AVIF beats JPEG on photographs, but not on every file. Here are the measured before-and-after sizes from running the tool, including the JPEGs it hands back unchanged.
Converting JPG to AVIF in the browser means nothing leaves your machine — there is no upload, no account and no deletion after an hour, because the file was never anywhere else. That is what this tool does: a WebAssembly build of the libavif encoder runs inside the page, and the numbers below are measurements from running it, not promises.
AVIF is worth the trouble on the right file and a waste of time on the wrong one. Nothing about the file name tells you which you have, so the only useful answer is a number. This post is that number, measured by running the shipped tool in Chrome and reading the bytes in each result row, then re-running the same fixtures to confirm the figures are stable.
What the conversion actually produced
Each figure below came from running the tool on a real file in the browser and reading the result row. The outputs were re-opened by the browser's own decoder to confirm the format and the dimensions, so none of it is copied from the page's own text.
- A 600×600 photographic test JPEG of 339,583 bytes became 102,783 bytes of AVIF at quality 50. That is roughly 70% smaller, and the row read
339,583 B → 102,783 B · 600×600 · q50. - The same photograph at quality 35 became 63,969 bytes (about 81% smaller); at quality 80 it became 180,972 bytes (about 47% smaller).
- A 148-byte JPEG — a deliberately tiny, already-tight image — encoded to 305 bytes of AVIF. The tool handed the JPEG back unchanged and said so.
The last line is the one most converter pages leave out. AVIF carries container overhead that a small JPEG does not pay, and on a 148-byte file that overhead is the whole story: 305 bytes of AVIF against 148 bytes of JPEG. The tool compares the two and hands you whichever is smaller, because the alternative is a converter that reliably makes small images bigger.
Why the JPEG-to-AVIF win is smaller than it looks
A JPEG has already thrown detail away. AVIF can throw away different detail, more cleverly, but it is improving on a file that is already compressed — so the win is real but it is modest, and it is not uniform. On noisy photographs AVIF does well; on a small JPEG that was saved tight, AVIF can come out larger. That is why every row reports a measured before-and-after number rather than a promised percentage.
The files AVIF cannot beat
On the tiny 148-byte JPEG above, AVIF came out at 305 bytes — more than double the source. The tool's default row said JPEG is smaller and returned the original bytes, byte for byte, named tiny.jpg rather than tiny.avif. Switch the fallback to Give me AVIF anyway and it will produce the AVIF, but it labels the row AVIF is larger so the cost is visible instead of hidden.
The boundary is not obvious from the file name. A 600×600 photographic JPEG loses about 70% of its bytes to AVIF at quality 50, while a 148-byte tight JPEG gains them. How many bytes the camera or PNG already squeezed out is what decides, not the subject of the picture.
JPEG quality against AVIF quality
- Quality 35 — 63,969 bytes, about 81% smaller. For thumbnails and decoration.
- Quality 50 — 102,783 bytes, about 70% smaller. The default, where the curve has already flattened.
- Quality 80 — 180,972 bytes, about 47% smaller. Near-original, and most of the extra bytes are noise the encoder is faithfully preserving.
Past roughly 65 the extra bytes buy very little visible detail. Quality 35 is for images that are decoration; 65 or 80 for images that are the product.
A file the tool refuses — and one it accepts
There is a class of broken JPEG a browser will happily decode. Chrome's JPEG decoder is lenient: give it a file that lost its tail and it renders the scanlines it managed to read and reports success. A converter that trusts the decode would hand back a mostly-blank AVIF badged as a huge saving.
The tool checks the container first. A JPEG whose end-of-image marker is missing is refused with:
This JPEG is incomplete — its end-of-image marker is missing, so the file was probably cut short while downloading. The browser can still show the part it has, but converting it would produce a blank image. Download it again and retry.
A corrupt file — bytes that look like a JPEG header but are not an image — is refused just as plainly:
Could not read this image — the file looks corrupt or is not really a JPG
A complete JPEG, by contrast, converts normally: dimensions untouched, format changed, size measured honestly.
What is preserved, and what is not
Dimensions are untouched. A format conversion and a resize are different jobs, and this tool only does the first: 600×600 in, 600×600 out. If you want fewer pixels, resize first and convert second.
There is no alpha channel to preserve. JPEG has no transparency, so nothing is flattened and nothing needs disclosing — what goes in comes out, opaquely.
Nothing else is touched. The file is not uploaded, not re-encoded when it does not need to be, and not renamed beyond its extension.
Nothing is uploaded
The decoding, the encoding and the size comparison all happen in your browser. Your images never leave your device — which matters more than it sounds, because the files people convert are client logos, unpublished designs, product photography and internal screenshots.
You do not have to take that on trust. Load the page, disconnect from the internet, and convert an image. It still works, because nothing was ever being sent anywhere.
How to use it
- Open the JPG to AVIF converter.
- Drop in one JPG or a whole batch.
- Leave quality at 50 unless you have a reason to move it. Choose 35 for thumbnails and long articles, 65 or 80 when the image is the point.
- Leave the fallback on Give me the smaller file. That is what stops a tight JPEG being made bigger. Switch it to Give me AVIF anyway only when something downstream requires the format.
- Read the before-and-after on each row before downloading. It states both sizes and the quality actually used, so you can see what happened instead of trusting a percentage.
Changing either setting re-runs the whole batch, so you can try quality 35, look at the result, and change your mind without starting over.
The short version
AVIF beats JPEG on photographs — a 339,583-byte test image became 102,783 bytes at quality 50, roughly 70% smaller — and it is larger than your original on small, already-tight JPEGs, where the tool hands your JPEG back unchanged. Quality 50 is the default, dimensions are preserved, nothing is flattened, and nothing is uploaded. And when AVIF loses, you get your own file back rather than a bigger one with a badge on it.
Tools mentioned
- Convert PNG to AVIFConvert PNG to AVIF in your browser — nothing is uploaded. AVIF is usually far smaller than WebP, and this…
- Convert WebP to JPGConvert WebP images to JPG format online for free. Universal compatibility, browser-based processing.
- Image CompressorCompress JPG, PNG and WebP images in your browser — nothing is uploaded, and every image shows the exact KB…
Frequently asked questions
Is AVIF actually smaller than JPEG?
Usually on photographs, and by a useful margin — but it depends on the file and the quality setting, which is what makes it worth measuring. On a 600×600 photographic test JPEG of 339,583 bytes, AVIF at quality 50 came out at 102,783 bytes (roughly 70% smaller). Push AVIF to quality 80 on the same image and it becomes 180,972 bytes, still smaller but no longer a clear win. A small, already-tight JPEG can beat AVIF, and the tool says so rather than handing you the bigger file.
Why did I get my JPEG back instead of an AVIF?
Because the AVIF was not smaller. AVIF carries container overhead that a small JPEG does not pay, and an already-tight JPEG can come out larger than the file it came from. When the AVIF loses, the row says "JPEG is smaller" and hands the original back unchanged rather than quietly making your page slower. Switch the fallback to "Give me AVIF anyway" if you need the format regardless of the size.
Does converting change the image dimensions?
No. The pixel dimensions are copied through untouched, so a 600×600 JPEG produces a 600×600 AVIF. A format conversion and a resize are different jobs, and this tool only does the first. If you need a smaller pixel count as well, resize first and then convert.
Are my images uploaded to a server?
No, and that is the reason the tool can exist at all. The AVIF encoder is a WebAssembly build of libavif that runs inside the page, so the pixels are read from your own machine, encoded in your own browser and handed straight back to you. You can disconnect from the internet after the page loads and it will still work. Most AVIF converters that rank for this query send the file to a server, which for a client logo or an unpublished design is the part that matters.
Will the AVIF open everywhere?
In every current browser. AVIF shipped in Chrome 85, Firefox 93 and Safari 16, and it is now supported by all of them on desktop and mobile, so a plain tag is enough. The one place it still needs care is older software outside a browser — some desktop editors, print tools and older CMS uploaders do not read AVIF yet, in which case keep the JPEG as well.
Is there a size limit?
Images up to 40 megapixels, which is well beyond any phone or consumer camera. The limit exists because the encoder runs on the main thread and libavif needs several bytes per pixel on top of the decoded bitmap the browser is already holding; past that a tab starts running out of memory rather than failing cleanly. If you hit it, resize the image below 40 megapixels first and then convert.
Related articles
- Remove Image Background Online — Without Uploading the PhotoRemove an image background without sending the photo to a server. A small on-device model finds the subject, and after the first load the whole job needs no internet at all.
- Passport Photo Size: Why the Print Comes Out WrongEveryone tells you 35 × 45 mm is 413 × 531 px. Almost nobody tells you that the file you download says 1 dpi, which is why the print comes out 146 mm wide. Measured on a real photograph, with the arithmetic.
- How to Add a Border or Frame to an Image (Without Photoshop)How to give an image a border or frame: the width, colour and rounded corners, measured on a real photo, with the format that keeps it smallest.
- How to Reduce Image Size to KB (20 KB, 50 KB, 200 KB)A form that says "maximum 200 KB" is not asking you to guess at a quality slider. Here is how to hit the number exactly, why "200 KB" means two different things, and what it costs in pixels.
- PNG to AVIF: Measured Sizes, and When AVIF LosesAVIF is the smallest format the web has, and on the right file it is dramatic — 4.07 MB of PNG became 482 KB. On the wrong file it is larger than what you started with. Here are the measured numbers for both.
Written by the Chaudify team. Every tool mentioned here runs entirely in your browser — nothing you open is ever uploaded. Browse all tools or read more guides.