비공개 100% 브라우저 내 JPEG XL 컨버터를 만들었습니다 (업로드 없음, 서버 없음).

작성자

카테고리:

← 피드로
DEV Community · El_Necora · 2026-06-25 개발(SW)

El_Necora

If you’ve ever downloaded a .jxl file and watched your browser shrug at it, you’ve met the JPEG XL problem: it’s a genuinely great image format that almost nothing opens yet. So I built a small tool that converts images to and from JPEG XL entirely in the browser — no upload, no account, no server touching your files.

Live: https://jpegxlconvert.com · Source: https://github.com/robertcassch-dot/jpegxlconvert

Why bother?

JPEG XL (.jxl) gives you smaller files at the same quality, lossless JPEG repacking (~20% off your existing JPEGs with zero quality loss), transparency, and a royalty-free spec. The catch in 2026 is support: most browsers and apps still can’t display a .jxl. Chrome removed it in 2022 and is in the process of bringing it back — but until that’s everywhere, people keep ending up with .jxl files they can’t view.

Most “online converters” answer that by uploading your image to their server. For a personal photo, that’s a lot of trust for a format conversion. I wanted the opposite: the file never leaves your device.

How it works

Everything runs client-side with WebAssembly:

  • JPG / PNG / WebP / GIF → JXL: the browser decodes the source natively, then @jsquash/jxl (libjxl compiled to WASM) encodes the JXL.
  • .jxl → PNG / JPG: decoded with @jsquash/jxl, re-encoded natively via a <canvas>.
  • HEIC (iPhone photos) → JPG/PNG/JXL: decoded in-browser too, so you can finally open HEIC outside Apple’s world.
import { encode } from '@jsquash/jxl';

const bitmap = await createImageBitmap(file);          // native decode
const canvas = new OffscreenCanvas(bitmap.width, bitmap.height);
canvas.getContext('2d').drawImage(bitmap, 0, 0);
const imageData = canvas.getContext('2d')
  .getImageData(0, 0, bitmap.width, bitmap.height);

const jxl = await encode(imageData, { quality: 90 });  // WASM encode, on-device

Enter fullscreen mode Exit fullscreen mode

No fetch() to a backend anywhere in that path — you can verify it in the Network tab, which is kind of the whole point.

A few things I learned

  • Self-host the WASM codec. Pulling it from a CDN at runtime works in dev, but for speed, reliability and a cleaner privacy story you really want the .wasm served from your own origin.
  • Orientation metadata bites you on HEIC. iPhone photos lean on EXIF orientation; if you ignore it, half your conversions come out sideways.
  • A “viewer” is half the product. Plenty of people don’t want to convert — they just want to see the .jxl. Decoding it to a <canvas> and offering a one-click “save as JPG/PNG” turned out to be the most-used path.

It’s open source

The whole static site is on GitHub: https://github.com/robertcassch-dot/jpegxlconvert. It’s multilingual (EN/ES/DE/FR/RU), deploys to any static host (I use Cloudflare Pages), and has zero backend.

If you’ve got .jxl files gathering dust, try it: https://jpegxlconvert.com. Feedback and issues welcome.

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다