Cookies for analytics and advertising
We use cookies for analytics and advertising, both sent to Google. Refusing changes nothing you can see.Read the privacy page
Converting a JPG to JXL here produces a smaller file by re-encoding it: about nineteen per cent smaller on this site’s own sample. It is not JPEG XL’s famous lossless JPEG recompression, which repackages the original without decoding it and can restore it byte for byte — that needs libjxl’s cjxl, and this page explains the difference.
Up to 100 files at once. Mixed formats are fine.
They convert one after another and download together as a ZIP.
JPG to JXL



JPEG XL has a capability nothing else in this family has: it can take an existing JPEG, repackage its coefficients without ever decoding them to pixels, and produce a file roughly twenty per cent smaller from which the original JPEG can be reconstructed byte for byte. Nothing is lost, nothing is added, and the operation is reversible. It is the strongest argument anyone has made for moving a photographic archive to the format.
This converter does not do it. Every image conversion on this site decodes its source to raw pixels and encodes the result afresh — that is the shape of the whole pipeline and there is no exception for this pair. What you get back is therefore a new lossy encode of your photograph: smaller, slightly different, and not convertible back into the file you started with. Saying so is the entire reason this page is written by hand rather than generated.
The JPEG is decoded by mozjpeg to an 8-bit RGB buffer, and libjxl encodes that buffer at the quality you choose, defaulting to 82. The result on this site’s own sample photograph is 8,924 bytes of JPG becoming 7,240 bytes of JXL — nineteen per cent smaller, which is close enough to the recompression figure to be confusing and is arrived at by a completely different route.
The difference matters more than the number. Nineteen per cent from re-encoding costs a generation of quality and cannot be undone; nineteen per cent from recompression costs nothing and can be undone at any time. If the saving is what you want and the exactness is not, this page is fine. If you were promised both, you were reading about cjxl.
libjxl ships two command-line programs, cjxl and djxl, and they are free, open-source and available for Windows, macOS and Linux. cjxl given a JPEG performs the lossless transcode by default, and djxl reverses it and hands you back the original JPEG. For a large library that is a script and an afternoon, and the result is genuinely reversible.
The reason it is not available here is architectural rather than ideological. This pipeline is built around decoding to pixels and encoding again, which is what makes a hundred format pairs work through one path, and a coefficient-level JPEG transcode is a special case that bypasses all of it. That is worth knowing rather than working around: a browser converter is the wrong shape for the job, and the right tool for it is a download away.
A JPEG has already thrown information away, and what remains includes its own artefacts: eight-by-eight block boundaries in flat areas, ringing along hard edges, and colour stored at half the resolution of brightness. Those are now simply the picture, and the JXL encoder spends bits reproducing them accurately while quantising afresh on top.
How much that hurts depends entirely on the original. A JPEG straight out of a camera at high quality survives a re-encode at 82 with very little visible change. A JPEG that has been through a messaging app, been screenshotted, or been saved at quality 60 has visible artefacts already, and the second pass makes them slightly worse rather than smoothing them. If the raw file or a lossless export still exists, encoding from that is strictly better — and if it does not, this is a fair trade only where the saving is worth a small step down.
The control runs from 1 to 100 and starts at 82. Because the source is already lossy there is an argument for setting it a little higher than you would from an original: the encoder is trying to reproduce a picture that contains structure it did not put there, and giving it more room means less of that structure is smeared further.
The top of the range behaves differently and is worth knowing. Measured through this site’s own encoder: at quality 100 a 256 by 256 gradient came back with 334 of 262,144 samples off by one level, and flat artwork came back bit-identical — near-lossless with respect to the decoded pixels, though not with respect to your JPEG file. The resulting JXL is much larger than the JPEG at that setting, so quality 100 makes sense only when the file is going into a workflow that will re-encode it again, not as a storage strategy.
A JPEG carries EXIF, XMP, IPTC, an ICC profile and often GPS coordinates, and for a photograph collection those are frequently as valuable as the pixels — the date, the camera, the lens, the location, the caption, the copyright line. None of it survives, because the conversion decodes to raw pixels and re-encodes, and that is unconditional rather than something the page lets you decide.
For a single photograph being sent somewhere that is often welcome, since it also removes the coordinates of the house it was taken in. For a library migration it is a serious problem and it is the second reason, after reversibility, that cjxl is the correct tool for that job: it preserves the whole metadata block along with the coefficients. Losing an ICC profile also flattens saturated colour slightly, because an untagged file is read as sRGB by whatever opens it next.
On this site’s own sample photograph at the default quality, the same picture is 8,924 bytes as JPG, 14,700 as WebP, 17,599 as AVIF and 7,240 as JXL. JPEG XL is the smallest of the four, which is the technical case for the format in one line — and mozjpeg’s JPEG is second, which is a reminder that a well-encoded JPEG is not the weakling it is often described as.
Support runs in exactly the opposite order. JPG opens everywhere, WebP opens in every current browser, AVIF in modern ones, and JXL in some. For a photograph that has to be sent, published or handed over, that ordering dominates and JPG or WebP is the right answer. JPEG XL wins only where the files stay inside a system you control.
The case for is genuine: about a fifth of the disk back, or more with the lossless transcode, on collections that are frequently hundreds of gigabytes. The case against is that JPEG is the most universally readable image format there has ever been, and a library that stops opening in the software you use is worth much more than the storage it costs.
The defensible middle is to keep the JPEGs and treat JXL as an experiment, or to use cjxl so the migration is reversible and nothing is actually at risk. What is not defensible is converting a twenty-year archive through a browser at quality 82 and deleting the originals, which is the reading of "JPEG XL saves twenty per cent losslessly" that this page exists to prevent.
mozjpeg decodes and libjxl encodes, both compiled to WebAssembly and both fetched only when they are needed, entirely inside your browser. Nothing about the photograph crosses the network, which matters for the material that ends up on this page — personal archives, client shoots, unpublished work.
The free limit is 100 MB per file, far beyond any JPEG. Batches work: drop a folder, each file converts with its own progress row, and the results come back as a ZIP. JPEG XL encoding is slower than WebP and faster than AVIF, so a few hundred photographs is a walk away. Convert a handful first, look at them at full size against the originals, and decide whether the nineteen per cent is worth the generation before committing anything larger.
| JPG | JXL | |
|---|---|---|
| Full name | JPEG Image | JPEG XL |
| File extension | .jpg, .jpeg, .jpe | .jxl |
| Media type | image/jpeg | image/jxl |
| Compression | Lossy — file size is bought with quality | Either, depending on the setting |
| First published | 1992 | 2021 |
| Published by | Joint Photographic Experts Group | Joint Photographic Experts Group |
| Specification | ITU-T T.81 | ISO/IEC 18181 |
| Licensing | Open standard | Open standard |
| Standing today | Current | Niche |
| Bit depth | 8 | 32 |
| Colour it can describe | RGB, greyscale, YCbCr | RGB, greyscale, wide gamut |
| Largest image | 65,535 px per side | — |
| Opens in a browser | Every browser | Some browsers |
| Considered instead | WebP, AVIF, HEIC | AVIF, WebP, PNG |
JXL has nowhere to put IPTC fields, which hold captions, credits and keywords and the GPS coordinates, so those go no further than the JPG. Worth checking before the original is deleted, and worth knowing if the point was to strip it.
JXL supports transparency and JPG does not. That is room the result has and the original never used — converting does not create a transparent background, it only makes one possible afterwards.
JXL can hold animation; a JPG is one frame. The result is a single-frame file in a format that could hold more.
Only some browsers read JXL. It is the less portable of the two, so it is worth being sure the program at the other end accepts it before sending one.
GIMP reads both JPG and JXL, so there is a way to check the result against the original without a second tool.
The result is larger than the original and no better. JPG has already discarded detail, and JXL stores what is left without discarding more — it prevents further loss rather than undoing the first one.
JPG is Joint Photographic Experts Group's format, published in 1992. It records 8 bits per channel.
JXL comes from Joint Photographic Experts Group and dates from 2021, specified as ISO/IEC 18181. GIMP and ImageMagick all read it.
JPG was published in 1992 and JXL in 2021. The older one is generally the safer file to hand to somebody; the newer one usually does the job in fewer bytes.
No. This conversion runs entirely inside your browser, so the file never leaves your device. You can confirm it yourself: open the network tab of your browser's developer tools and convert something. You will see the page load, plus the analytics and advertising the site is paid for with — and nothing carrying your file. The engine behind this particular pair is jSquash, WebAssembly builds of the reference image codecs; your browser fetches it once and caches it.
No. That feature repackages a JPEG’s existing coefficients without decoding them, so the original file can be reconstructed byte for byte later. This converter decodes to pixels and re-encodes, like every other pair on the site, so what you get is a fresh lossy encode.
libjxl’s own command-line tool, cjxl, run with lossless JPEG transcoding enabled, and djxl to reverse it. It is free and cross-platform. If byte-for-byte reversibility is the reason you are interested in JPEG XL, that is the tool for the job rather than any browser converter.
On this site’s own sample photograph, 8,924 bytes as JPG became 7,240 as JXL at the default quality — about nineteen per cent. That is close to the figure quoted for lossless recompression, arrived at by a different and irreversible route.
Slightly. The JPEG’s existing artefacts are part of the picture now, and the JXL encoder reproduces them faithfully while adding a generation of its own. At quality 82 it is modest on a good original and clearly visible on a JPEG that has already been through a messaging app twice.
You can, and it will be a third generation rather than your original file. Nothing in this direction is reversible. Keep the JPEGs if the JPEGs are what you care about.
Only with the originals kept, and only if you control what reads them. Browser support is partial, Photoshop needs a plug-in, and much ordinary software does not recognise the format. A twenty-year photo collection that stops opening in the tools you use is a poor trade for a fifth of the disk.
The claims this page makes about JPG and JXL are checkable, and these are the documents that settle them.