Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use the JPEG XL reference decoder djxl to convert a .jxl image: choose a .png output to preserve the decoded pixel values, or a .jpg output when you need JPEG compatibility. A JPG conversion may re-encode the image and lose quality; exact recovery is possible only for JXL files that contain recompressed JPEG data.

Convert a JPEG XL image with djxl

The libjxl project’s command-line decoder selects the output format from the filename extension. Its README documents the decoding approach, and the djxl manual describes the available output and decoding options.

  1. Install the libjxl tools for your operating system. The project documents apt install libjxl-tools on Debian-based Linux, Homebrew on macOS, and Windows binaries through its releases.
  2. Open a terminal or command prompt in the folder containing the JXL image, or use full paths to the input and output files.
  3. Run djxl input.jxl output.png for PNG, or djxl input.jxl output.jpg for JPG.
  4. Check the destination folder for the converted image. Replace input.jxl and the output name with your actual filenames; quote paths that contain spaces.

For example, djxl "family photo.jxl" "family photo.png" writes a PNG. These are documented commands and installation options, not a claim that conversion was tested on each operating system.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose PNG or JPG based on what you need to preserve

Output Best fit Quality implications
PNG Preserving the decoded pixel values PNG can store the decoded pixels without another lossy image-encoding step. This preserves pixels, not the original JXL file or its bitstream.
JPG Systems or workflows that require JPEG Ordinary conversion may decode the JXL pixels and encode a new JPEG, which is lossy. The documented default JPEG quality is 95; that setting does not make the conversion lossless.

When can JXL convert back to the exact original JPG?

If the JXL was created by recompressing an existing JPEG, djxl can reconstruct that original JPEG by default. This is a special case: it does not mean every JXL can be converted to JPG without loss.

#1 Best Overall
WavePad Audio Editing Software - Professional Audio and Music Editor for Anyone [Download]
  • Full-featured professional audio and music editor that lets you record and edit music, voice and other audio recordings
  • Add effects like echo, amplification, noise reduction, normalize, equalizer, envelope, reverb, echo, reverse and more
  • Supports all popular audio formats including, wav, mp3, vox, gsm, wma, real audio, au, aif, flac, ogg and more
  • Sound editing functions include cut, copy, paste, delete, insert, silence, auto-trim and more
  • Integrated VST plugin support gives professionals access to thousands of additional tools and effects

Avoid --pixels_to_jpeg when exact JPEG recovery is your goal. That option tells the decoder to output decoded pixels as a newly encoded JPEG, rather than reconstructing the original JPEG data.

Handle animated images, color profiles, and metadata

Animated JXL files

For animated input, the decoder produces multiple output files—one for each frame—with frame-number suffixes. Check the output folder for all generated files rather than expecting a single still image.

Rank #2
Sale
Roxio Creator NXT Pro 9 | Multimedia Suite + Photo Editor and CD/DVD Disc Burning Software [PC Download]
  • Complete multimedia suite with 25+ applications to capture, edit, and convert video, photo, and audio files, burn, copy, and encrypt your data, author DVDs, and more
  • Edit your media with easy-to-use tools to modify your video, audio, and photos, create slideshows and movies, layer tracks with transparency controls, create split screen videos, and more
  • Enjoy Pro-exclusive extras that include advanced video editing tools, photo animation creation with PhotoMirage Express, and photo editing and graphics functionality with PaintShop Pro 2021
  • Organize your hard drive and identify long-forgotten, duplicate, or unnecessary files, and convert your media to popular formats, which is now easier than ever with the new easy file converter
  • Create audio CDs or custom DVDs using drag-and-drop functionality to burn, copy, encrypt, and author discs, now with the new Template Designer to fully customize menu templates to your preferences

Color profiles and metadata

If color appearance or embedded metadata matters, review the decoder’s ICC-profile and metadata export options in the djxl manual. Do not assume these will always transfer intact: the decoded color profile can differ when color-space overrides are used or a conversion is unsupported.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What “lossless” means for this conversion

Converting to PNG can preserve the pixels produced by decoding the JXL, but the resulting PNG is not a copy of the original JXL data. The Debian manual documents a pixel-comparison example with zero maximum pixel error for its specified workflow; that demonstrates pixel equality for that example, not a guarantee for every file or setting.

Rank #3
Photo Enhance HDR Editor Pro
  • Make your photos more memorable and dramatic
  • Adjust brightness, contrast, saturation, tone, and subtlety
  • Choose the Hi-black option to create black and white photos
  • Save Hi-resolution images to your SD card
  • Share your photos via e-mail, Bluetooth, Facebook, FlickFolio, Flickr, Gmail, Peep, Picasa, or PicSay Pro

Converting to JPG usually means another lossy encoding step. The exception is reconstruction of the original JPEG from JXL that contains recompressed JPEG data. Also, quality values are codec-specific: matching quality numbers across formats does not guarantee matching visual quality or file size.

In libjxl’s encoder API, the actual lossless setting overrides other encoding options to enable bit-for-bit lossless encoding. A distance value of zero alone is not always sufficient unless that lossless setting is applied. That encoder detail does not change the output-format trade-off when decoding an existing JXL file.

Quick Recap

Bestseller No. 3
Photo Enhance HDR Editor Pro
Photo Enhance HDR Editor Pro
Make your photos more memorable and dramatic; Adjust brightness, contrast, saturation, tone, and subtlety
$3.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.