Java JPEG XL Library — Read & Convert JPEG XL Files
Decode and convert JPEG XL (.jxl) in pure Java. No native code. Drop-in ImageIO replacement. Commercial license with dedicated support.
JDeli is a commercial, pure-Java image library that reads and converts JPEG XL files with no native code or third-party dependencies.
It works as a drop-in ImageIO replacement, so your existing Java code can decode the .jxl files that standard ImageIO cannot.
JDeli decodes JPEG XL and converts it to formats like JPEG and PNG; it does not encode JPEG XL.
Quick Start
Get running in 30 seconds. Add the dependency, write one line, decode any JPEG XL file.
// Add IDR Solutions repository to your pom.xml
<repositories>
<repository>
<id>IDRsolutions</id>
<name>IDR Solutions</name>
<url>https://maven.idrsolutions.com</url>
</repository>
</repositories>
// Add JDeli as a dependency
<dependencies>
<dependency>
<groupId>com.idrsolutions</groupId>
<artifactId>jdeli</artifactId>
<version>{YYYY.MM}</version>
</dependency>
</dependencies>// Add IDR Solutions repository to your build.gradle
repositories {
maven {
url = "https://maven.idrsolutions.com"
name = "IDRsolutions"
credentials(PasswordCredentials)
}
}
// Add JDeli as a dependency
dependencies {
implementation "com.idrsolutions:jdeli:{version}"
}JPEG XL Code Examples for Java
Copy-paste solutions to the exact problems Java developers search for.
// Read JPEG XL files
JDeli.read(File jxlFile);
JDeli.read(byte[] jxlData);
JDeli.read(InputStream jxlStream);// Convert to and from JPEG XL files
JDeli.convert(File inFile, File outFile);
JDeli.convert(InputStream inStream, OutputStream outStream, String format);
byte[] outputData=JDeli.convert(byte[] inputData, String format);// Convert JPEG XL to PNG
JDeli.convert(new File("input.jxl"), new File("output.png"));
JDeli.convert(jxlStream, pngStream, "png");
byte[] pngData = JDeli.convert(jxlData, "png");// Convert JPEG XL to JPG
JDeli.convert(new File("input.jxl"), new File("output.jpg"));
JDeli.convert(jxlStream, jpgStream, "jpg");
byte[] jpgData = JDeli.convert(jxlData, "jpg");// Batch convert a directory of JPEG XL files to PNG from the command line.
// Also how you call JDeli from any language that can spawn a process.
java -jar jdeli.jar --convert png "inputFileOrDir" "outputDir"Java JPEG XL Library Comparison
An honest comparison. Where alternatives are equal or better, we say so.
| Feature | JDeli | jxlatte | vavi-image-jpegxl |
|---|---|---|---|
| JPEG XL Read | ✅ Yes | ✅ Yes | ✅ Yes (via native libjxl) |
| JPEG XL Write | ❌ Not supported | ❌ Decoder only | ❌ Reader only |
| Convert JPEG XL to other formats | ✅ One-line JDeli.convert() |
⚠️ Bundled PNG and PFM writers only | ⚠️ Decode, then write it yourself |
| Pure Java (no native code) | ✅ Yes | ✅ Yes | ❌ JNA wrapper around native libjxl |
| Server setup | ✅ Add one JAR | ✅ Add one JAR | ⚠️ Install libjxl, set -Djna.library.path |
| ImageIO compatible | ✅ Drop-in plugin | ❌ Own API only | ✅ ImageIO reader SPI |
| Image processing | ✅ Crop, resize, rotate, etc. | ❌ Decode only | ❌ Decode only |
| Project status | ✅ Production, release every 6 weeks | ⚠️ Self-described work in progress | ⚠️ Community project |
| Commercial support | ✅ Dedicated team, bug fixes in days | ❌ Community only | ❌ Community only |
| License | Commercial (paid) | MIT (free) | ⚠️ None declared |
Key takeaway: JPEG XL support in Java is thin, and the two free options each come with a real catch. jxlatte is genuinely pure Java under a permissive MIT license, so if you only need to decode and can accept a self-described work in progress with no ImageIO integration, it is a fair choice. vavi-image-jpegxl gives you the ImageIO plugin route, but it wraps native libjxl through JNA, so libjxl has to be installed on every machine, and the project declares no license at all — usually a blocker for commercial work. JDeli is the pure-Java option with an ImageIO-compatible API, one-line conversion, and a support team behind it. No Java library, JDeli included, currently encodes to JPEG XL.
JPEG XL Format Support in Depth
Lossless and Lossy Decoding
JPEG XL supports both a lossless mode and a lossy mode. JDeli decodes both, so whether a .jxl file was created for archival quality or for size, it reads back into a BufferedImage ready to use or convert.
ICC Colour Profiles
JDeli reads the ICC colour profile embedded in a JPEG XL file and applies it during decoding. This keeps colours faithful to the source in colour-managed workflows, rather than shifting the way decoders that ignore the profile do.
Colour Spaces: Grayscale, LAB, RGB
JDeli decodes JPEG XL images stored in grayscale, LAB, and RGB colour spaces. The pixels are returned in a standard Java image so the rest of your pipeline — conversion, display, or processing — works unchanged.
Why Use JDeli over ImageIO for JPEG XL?
The JDK has no JPEG XL support at all. JDeli adds it, and does so without the drawbacks of the native alternatives.
ImageIO cannot read JPEG XL
Java's built-in ImageIO has no JPEG XL reader, so ImageIO.read() simply returns null for a .jxl file. JDeli's ImageIO plugin adds JPEG XL decoding, so existing ImageIO.read() code starts handling JPEG XL with no changes.
No native code
The free ImageIO plugin for JPEG XL wraps the native libjxl library through JNA, so libjxl has to be installed on every machine and a JNA library path set before anything decodes. JDeli is pure Java, so it runs anywhere a JVM does with nothing extra to install.
One-line conversion
Because browser and tooling support for JPEG XL is still limited, the common task is decoding .jxl and re-saving it as JPEG or PNG. JDeli does that in a single JDeli.convert() call, handling the read and the write for you.
Actively maintained with real support
JPEG XL is a young format and decoders still hit edge cases. JDeli ships a release every 6 weeks, and format bugs are typically fixed within days of a reproducible report — not left in a public issue tracker for years.
Trusted by Companies around the World
JDeli handles not only HEIC but other types of file formats as well.
- Joselito M. (Senior Applications Developer at Omaha National)
Frequently asked questions
Does Java ImageIO support JPEG XL?
No. Java’s built-in ImageIO cannot read JPEG XL. JDeli adds JPEG XL read support via an ImageIO plugin. Drop in the JAR and your existing ImageIO.read() calls decode JPEG XL files without code changes.
Can JDeli write or encode JPEG XL?
No. JDeli reads (decodes) JPEG XL and converts it to other formats such as PNG, JPEG, WebP, and TIFF. It does not currently encode images to JPEG XL. If you need to produce JPEG XL output, JDeli is not the right tool for that step.
How do I convert JPEG XL to PNG in Java?
Call JDeli.convert(new File("input.jxl"), new File("output.png")). JDeli infers the output format from the file extension. See Convert JPEG XL to PNG in Java for a full example.
How do I convert JPEG XL to JPG in Java?
Call JDeli.convert(new File("input.jxl"), new File("output.jpg")). JDeli infers the output format from the file extension. See Convert JPEG XL to JPG in Java for a full example.
How does JPEG XL compare to JPEG and WebP?
JPEG XL is a modern codec that offers better compression than both JPEG and WebP at equivalent quality, supports lossless and lossy modes, and can losslessly recompress existing JPEG files. Its main drawback is limited browser support, so many workflows decode JPEG XL to a widely supported format such as PNG or JPEG for delivery, which is exactly what JDeli does in Java.
Are there free Java libraries for JPEG XL?
The main free option is jxlatte, a pure-Java JPEG XL decoder. There are also JNI wrappers around the reference libjxl library, which require native binaries on the server. JDeli is a commercial pure-Java alternative with dedicated support.
Why use JDeli for JPEG XL image support?
1.
2.
3.