Convert ICO to JXL

Converting ICO to JXL takes the largest image out of the icon container and encodes it with JPEG XL, which is a reasonable thing to do for storage and a poor one for anything that has to be displayed — 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.
  • Lossy Some detail is traded for size. JXL cannot hold everything an ICO can.
  • File size limit Up to 100 MB per file, free, without an account.

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

What ICO to JXL actually does

A generated landscape with a low sun and three ridges, used to show what JPEG does to continuous tone. Shown as ICO.

ICO139 KB

A generated landscape with a low sun and three ridges, used to show what JPEG does to continuous tone. Shown as JXL.

JXL7 KB19.6× smaller

A photographic scene — smooth gradients, soft edges, grain. This is the case JXL is designed for or against, and the figures show which. Both images are drawn in code and encoded by the same converter that runs on this page, so the sizes are this site's own output.
A generated badge: a circular gradient on a transparent background with a white bar across it, used to show what each format does with transparency and with hundreds of shades. Shown as ICO.

ICO7 KB

A generated badge: a circular gradient on a transparent background with a white bar across it, used to show what each format does with transparency and with hundreds of shades. Shown as JXL.

JXL5 KB30% smaller

A transparent background and a gradient across the shape. JXL either keeps both, keeps one, or fills the transparency with a solid colour — which is the difference that catches people out. Both images are drawn in code and encoded by the same converter that runs on this page, so the sizes are this site's own output.
A generated application window with a sidebar, a table and a bar chart, used to show what JPEG does to flat colour and hard edges. Shown as ICO.

ICO3 KB

A generated application window with a sidebar, a table and a bar chart, used to show what JPEG does to flat colour and hard edges. Shown as JXL.

JXL13 KB5.0× larger

Flat colour and hard edges, as in an interface, a chart or a logo. Very different behaviour from the photograph above, and the reason the answer is "it depends what is in the file". Both images are drawn in code and encoded by the same converter that runs on this page, so the sizes are this site's own output.

The browser that writes this file may refuse to read it back

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

The situation is genuinely odd and it is not a bug on this page: encoding and decoding are separate pieces of software, and the encoder here is a WebAssembly module that ships with the page rather than something the browser provides. It does mean you should not expect to preview the result by dragging it into a tab, and it rules the format out for anything served to visitors.

What JPEG XL is for, and why an icon is a thin case for it

JPEG XL was designed around two things that matter enormously in archives and hardly at all on a favicon: it can re-encode an existing JPEG losslessly, cutting roughly a fifth off a photographic library without touching a pixel, and it supports very high bit depths and enormous dimensions for long-term storage of scanned and photographic material.

An icon offers it neither. There is no JPEG to transcode, no gradient to model, no bit depth beyond eight and no dimension beyond 256. What is left is a general-purpose encoder applied to a small flat drawing, which is the content type every modern codec handles worst.

The measured size, ranked against the alternatives

The same 256-pixel test icon through every target this site writes, at default settings: 1,737 bytes as PNG, 1,894 as GIF, 3,054 as WebP, 3,624 as AVIF, 4,005 as JPEG and 4,348 as JPEG XL. The most modern format produced the largest of the compressed results.

That ordering is specific to small flat artwork and it reverses on a photograph, where JPEG XL and AVIF pull well ahead. Quoting the photographic result as a reason to convert icons is the mistake this section exists to prevent.

The file starts FF 0A, and some tools expect the other header

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 codestream form, confirmed by reading the first bytes of the output. Both are valid and libjxl reads both, but a strict ingest process configured to expect the container will reject one that has no boxes in it. If a pipeline refuses the file, check this before assuming the encoder is at fault.

Transparency, and the lossless option this path does not offer

The alpha channel is supported by the format and carried through the conversion, so a cut-out mark does not acquire a background the way it does on the GIF path. That much works as expected.

What is not offered is a lossless switch. The quality control starts at 82 and the pair is classified as lossy, which is an accurate description of what the encoder is being asked for. JPEG XL has a genuine mathematically lossless mode and this page does not expose it — so if the reason for the conversion is archival fidelity, PNG is lossless by construction and requires no setting to get right.

Only one drawing from the container is encoded

The largest. Your browser decodes the icon and returns its biggest entry, checked by constructing a file holding 16, 32, 48 and 256 pixel drawings in four separate colours and converting it with the directory ordered three different ways. The 256-pixel drawing came out each time.

For an archive that is a meaningful loss. The point of an icon file is often that somebody hand-drew the 16-pixel version, and it is precisely that drawing which disappears. If the archive is meant to preserve the asset rather than a picture of it, keep the ICO itself.

What will actually open the result in five years

GIMP and ImageMagick both read JPEG XL today and both are the kind of software that stays around, which is the strongest argument for the format in a tool chain. libjxl is open source and the specification is published as ISO/IEC 18181, so the decoder is not going to become unavailable in the way a proprietary one might.

Against that: the format has been standardised since 2021 and its browser support has gone backwards rather than forwards in that time. Archival formats are chosen for the confidence that something will read them, and on that specific measure PNG and TIFF are still ahead of JPEG XL by a wide margin.

The case for and against putting an icon library in JXL

The case for is uniformity. If a collection already holds thousands of photographs as JPEG XL, converting the handful of icons in it means one decoder, one ingest rule and one thing to test, and a couple of extra kilobytes per icon is not worth a second code path.

The case against is that icons are the part of that collection where the format helps least and the loss is largest, since the container’s other entries do not survive. A reasonable middle is to keep the original ICO files as the record and treat the JXL as a derived preview, which is how most archives handle formats they cannot fully represent.

Converting a directory of icons in one pass

Drop the whole folder and each file is encoded on its own, with everything 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 are quick.

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

How to convert an ICO file into a JPEG XL image

  1. Drop your ICO file onto this page, or click to choose one.
  2. The JPEG XL encoder runs in your browser — the first file is the slow one.
  3. Download the JXL, and check it opens in the tool that will use it.

ICO against JXL: an icon container against a bare codestream

ICO compared with JXL
ICOJXL
Full nameWindows IconJPEG XL
File extension.ico.jxl
Media typeimage/x-iconimage/jxl
CompressionLossless — nothing is discardedEither, depending on the setting
First published19852021
Published byMicrosoftJoint Photographic Experts Group
SpecificationISO/IEC 18181
LicensingPublished, not standardisedOpen standard
Standing todayNicheNiche
Bit depth832
Colour it can describeRGB, indexed paletteRGB, greyscale, wide gamut
Largest image256 px per side
Opens in a browserEvery browserSome browsers
Considered insteadPNG, SVGAVIF, WebP, PNG

What survives

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

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.

GIMP reads both ICO and JXL, so there is a way to check the result against the original without a second tool.

What each format is for

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

ICO is Microsoft's format, published in 1985. It records 8 bits per channel.

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

ICO was published in 1985 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.

ICO to JXL: support, file size and what opens the result

Can my browser open the JXL it produced?

Possibly 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 does read it. The encoder shipping with a page whose browser cannot display the result is unusual and worth knowing before you convert a collection.

What software opens a JXL file?

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

How large is the result?

On a 256-pixel test icon, 4,348 bytes — larger than the WebP at 3,054, the AVIF at 3,624 and, most of all, the PNG at 1,737. Efficient formats do badly on small flat artwork and JPEG XL is no exception.

Is the conversion lossless?

Not by default. The quality control starts at 82 and the pair is treated as lossy, which is the honest description of what the encoder is asked to do. If bit-exact storage is the goal, PNG is lossless by construction and needs no setting.

Which form of the file is written?

The bare codestream, which begins with the bytes FF 0A. The other legal form wraps the same data in an ISOBMFF container beginning 00 00 00 0C 4A 58 4C 20. Both are valid JPEG XL; a tool that only accepts one will reject the other.

Does the icon get sent anywhere?

No. The JPEG XL encoder runs as WebAssembly in this tab, so a directory of icons is converted without any of it leaving the machine.

More about these formats