Convert SVG to JXL

Converting SVG to JXL renders the drawing to pixels and encodes it with JPEG XL, which makes sense inside a stored library that has settled on the format and very little sense anywhere else — most browsers cannot open the result, including, when this was measured, the one that produced it.

  • Where it runs In your browser. The file is never uploaded.
  • Rebuilt JXL works differently from an SVG, so this is not the gradual degradation a lossy codec applies. What JXL can express is reproduced faithfully; what it has no equivalent for does not survive at all.
  • File size limit Up to 100 MB per file, free, without an account.
  • Worth knowing Text is rendered with the fonts embedded in the file; anything else falls back.

Up to 100 files at once. Mixed formats are fine.

Trading a format everything reads for one almost nothing does

SVG is read by every browser shipped this century, by every design tool, by most office software, by anything that renders HTML in an email, and by a text editor if you are desperate. JPEG XL is read by libjxl and by the software that has linked it. That is the trade this conversion makes, and it is the largest thing on the page.

It was measured rather than assumed. A test drawing converted here produced a valid 20,368-byte JPEG XL, and handing that file straight back to the same browser’s decoder failed with "The source image could not be decoded". Chrome shipped support behind a flag and removed it in 2023; Safari is the major browser that reads one today.

The measured sizes, and where JPEG XL lands among them

The same 140-byte drawing, rendered 1,024 pixels wide and converted to every raster target this site writes: 9,730 bytes as AVIF, 20,368 as JPEG XL, and 4,195,304 as an uncompressed TIFF. JPEG XL, the newest format in the list, produced twice the bytes of AVIF.

That ordering is specific to small flat artwork and reverses on photographs, where JPEG XL is excellent. Quoting the photographic result as a reason to convert drawings is the mistake this section exists to prevent — and every number in the list is enormous next to the 140 bytes the drawing already occupied.

What JPEG XL is designed for, and why a drawing is not it

The format was built around two things that matter enormously in photographic archives. It can re-encode an existing JPEG losslessly, cutting roughly a fifth off a photographic library without touching a pixel, and it handles very high bit depths and very large dimensions for scanned and sensor-derived material.

A drawing offers it neither. There is no JPEG to transcode, no sensor noise to model, no gradient beyond what the artwork happens to contain and no bit depth beyond eight. What remains is a general-purpose encoder applied to flat fills and hard edges, which is where every modern codec compares worst against a vector or a PNG.

The bare codestream, and the container some ingests expect

JPEG XL has two legal file forms. The bare codestream begins with the two bytes FF 0A. The container form wraps the same codestream in an ISOBMFF box structure beginning 00 00 00 0C 4A 58 4C 20, which is what lets a file carry Exif, XMP and an ICC profile alongside the image.

The files written here are the bare form, confirmed by reading the first bytes of the output. libjxl reads both, and a strict ingest configured to expect boxes will reject one that has none. If a pipeline refuses the file, check the header before assuming the encoder produced something invalid.

The render size, and the property being sealed in

An SVG has no pixel size, so the conversion picks one: 1,024 pixels wide by default with the height following the drawing’s proportions, and the scale setting covers 0.1 to 10 for anything from 102 to 10,240 pixels.

That choice is permanent. The whole reason to keep a drawing as a vector is that the size question stays open — the same file serves an icon, a page banner and a print sheet. Rendering it answers the question once, and no later step can reopen it: enlarging the JXL interpolates pixels that were never drawn, and tracing it back into paths produces a different, worse file.

Transparency, and the lossless mode this path does not expose

The alpha channel is supported by the format and preserved through the conversion, so a cut-out drawing does not acquire a background — unlike the GIF path on this site, which turns the same transparent pixels opaque black.

What is not offered is a lossless switch. The quality control starts at 82 and the pair is classified as lossy, which honestly describes what the encoder is asked to do. If the reason for converting is archival fidelity, that is an argument against this path rather than for it: the SVG is already exact and PNG is lossless without a setting to get wrong.

What will still open the file in ten years

GIMP and ImageMagick read JPEG XL today, both are the kind of software that persists, and libjxl is open source with the specification published as ISO/IEC 18181. The decoder is not going to vanish the way a proprietary one might.

Against that, the format has been standardised since 2021 and its browser support has moved backwards rather than forwards in that time. Archival formats are chosen for confidence that something will read them, and on that measure PNG, TIFF and — for a drawing — SVG itself are all ahead by a wide margin.

For a drawing archive, SVG is already the archival format

This is worth stating plainly because it cuts against the instinct that newer means better preserved. An SVG is XML: plain text, an open W3C specification, readable by a human with a text editor if every renderer on earth disappeared, and diffable in version control so its history is legible. Very few formats in any category are in that position.

A rendered copy is a derived artefact, useful for showing the drawing to something that cannot read one. Keep the SVGs as the record and treat the JXLs as previews. An archive that replaced its vectors with a lossy raster in a format two browsers dropped would be a genuinely bad outcome, and it happens by converting a folder without thinking about which file is the master.

Converting a folder of drawings in one pass

Drop the whole set and each drawing is rendered at the same scale and encoded on its own, with the results returned as a ZIP. The JPEG XL encoder is one of the two large WebAssembly modules on this site, so the first file pays for the download and the rest follow quickly.

Check a sample in whatever will consume them before converting the rest. Since the browser may not display a JXL at all, the usual habit of opening one to confirm it looks right does not work — and a batch that quietly produced files nothing in the pipeline accepts is an expensive thing to find out late.

How to render an SVG into a JPEG XL file

  1. Decide whether the SVG itself should stay the stored copy.
  2. If not, drop it here and set the scale to the size you need.
  3. Download the JXL and confirm it opens in the tool that will use it.

SVG against JXL: an editable description against a sealed codestream

SVG compared with JXL
SVGJXL
Full nameScalable Vector GraphicsJPEG XL
File extension.svg.jxl
Media typeimage/svg+xmlimage/jxl
CompressionUncompressedEither, depending on the setting
First published20012021
Published byW3CJoint Photographic Experts Group
SpecificationSVG 1.1ISO/IEC 18181
LicensingOpen standardOpen standard
Standing todayCurrentNiche
Bit depth32
Colour it can describeRGBRGB, greyscale, wide gamut
Opens in a browserEvery browserSome browsers
Considered insteadPNG, PDFAVIF, WebP, PNG

What is lost

SVG describes shapes and JXL stores pixels. The result is sharp at the size it was rendered and no sharper — enlarging it afterwards can only invent the pixels in between, which is why the export size matters more here than in most conversions.

What survives

Transparency survives. Both SVG and JXL store an alpha channel, so a cut-out stays cut out and nothing is filled in behind it.

Animation survives. SVG and JXL both hold multiple frames, so the result moves rather than freezing on the first one.

Opening the result

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.

The usual programs do not overlap: SVG opens in Inkscape, Adobe Illustrator and Figma, JXL in GIMP and ImageMagick — so whoever receives the result needs something from the second list.

What each format is for

The two are aimed at different work: SVG at the web, line art and logos and editing, JXL at archiving and photography. That is worth weighing before converting, because the reason one exists is usually the reason the other is awkward.

SVG is W3C's format, published in 2001. The specification is SVG 1.1, and it is worth reading if the file has to outlive the tool that wrote it.

JXL comes from Joint Photographic Experts Group and dates from 2021, specified as ISO/IEC 18181. GIMP and ImageMagick all read it.

SVG was published in 2001 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.

SVG to JXL: what reads it, how big it is, what is lost

Can I open the JXL in a browser?

Probably not. Measured here: the Chromium build that produced the file then refused to decode it, because Chrome removed JPEG XL support in 2023. Safari is the major browser that reads one. An SVG, by contrast, opens in every browser ever shipped this century.

How large is the result?

On a 140-byte test drawing rendered 1,024 pixels wide, 20,368 bytes — roughly twice the AVIF of the same render at 9,730 bytes. Small flat artwork is the content type every modern codec handles worst.

What software opens a JXL?

GIMP and ImageMagick both read it, and those are the two most likely to be in a tool chain already. Beyond them support is patchy: most viewers, most office software and most upload forms have never heard of the format.

Is the conversion lossless?

Not by default. The quality control starts at 82 and the pair is treated as lossy. JPEG XL has a genuine mathematically lossless mode and this path does not expose it, so for exact storage the SVG itself, or a PNG, is the safer choice.

Which file form is written?

The bare codestream, beginning with the bytes FF 0A. The other legal form wraps the same data in an ISOBMFF container starting 00 00 00 0C 4A 58 4C 20, which is what carries Exif and ICC data. A strict ingest expecting the container will reject one without boxes.

Does the drawing get uploaded?

No. resvg renders and the JPEG XL encoder runs, both as WebAssembly in this tab, so the artwork never leaves your machine.

More about these formats

Where these figures come from

The claims this page makes about SVG and JXL are checkable, and these are the documents that settle them.