Image MIME Reference
JXL
JPEG XL
image/jxl
VS
Khronos Texture 2.0
image/ktx2
KTX2
A complete technical comparison of JPEG XL and Khronos Texture 2.0 — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.
JXL wins on browser support
Feature Support
| Feature | JXL | KTX2 |
|---|---|---|
| Transparency (Alpha) | Yes | Yes |
| Animation Support | Yes | ✕ No |
| Progressive Loading | Yes | ✕ No |
| HDR Support | Yes | Yes |
| EXIF Metadata | Yes | ✕ No |
| ICC Color Profile | Yes | ✕ No |
JPEG XL
image/jxl
Extension
.jxl
Container
ISOBMFF / JPEG XL Codestream
Compression
Lossy (VarDCT) / Lossless (Modular)
Algorithm
VarDCT (Variable block-size DCT)Modular (Predictive coding for lossless)
Color Depth
8-bit, 10-bit, 12-bit, 16-bit, 32-bit (Float)
Developed by
Joint Photographic Experts Group (JPEG)
Released
2021
Magic Bytes
FF 0A (Codestream) / 00 00 00 0C 4A 58 4C 20 0D 0A 87 0A (Container)
Khronos Texture 2.0
image/ktx2
Extension
.ktx2
Container
KTX 2.0
Compression
Basis Universal (ETC1S / UASTC) / Zstandard (zstd) Supercompression / Uncompressed
Algorithm
ETC1SUASTCZstandard (zstd)Raw GPU Formats (ASTC, BCn)
Color Depth
8-bit, 16-bit, 32-bit (Float)
Developed by
Khronos Group
Released
2021
Magic Bytes
AB 4B 54 58 20 32 30 BB 0D 0A 1A 0A
Browser Support Comparison
| Browser | JXL | KTX2 |
|---|---|---|
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✓ 17+
|
✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
JXL
JXL Strengths
- Capable of losslessly recompressing legacy JPEG files, saving ~20% space while retaining perfect byte-for-byte restorability
- Highly superior progressive decoding (Saliency-driven), allowing recognizable images to load extremely fast on slow connections
- Outperforms WebP and competes favorably with AVIF, especially at high-fidelity settings and for complex textures/photography
- Royalty-free with an open-source reference implementation (libjxl)
Limitations
- Google's removal of JXL support from Chrome severely hindered its adoption as a universal web standard
- Lack of hardware decoding chips compared to video-derived codecs like AVIF (AV1)
- File parsing logic is complex due to the split between raw codestreams and ISOBMFF containers
KTX2
KTX2 Strengths
- Universal hardware compatibility: write once, transcode anywhere to the target GPU's preferred format (ASTC, BC7, PVRTC, etc.)
- Drastically reduces transmission size over networks thanks to Basis Universal and Zstandard supercompression
- Seamless integration with the glTF ecosystem for optimized 3D asset delivery
Limitations
- Requires WebAssembly (Wasm) decoders and JavaScript loaders for web viewing, increasing initial application payload slightly
- Encoding textures into high-quality Basis Universal UASTC can be computationally intensive and slow
- Zero support in traditional 2D image viewers or native OS previews
When to choose which format
JXL
Use JXL when…
- High-End Web Delivery (via Safari/Polyfills)
- HDR Photography
- Legacy JPEG Archiving
- Digital Art & Image Storage
KTX2
Use KTX2 when…
- glTF 3D Models (KHR_texture_basisu)
- WebGPU and WebGL Applications
- Game Engines (Unity, Unreal, Godot)
- Augmented and Virtual Reality (AR/VR)