JPG to ICO Converter

What this conversion always does
  • The Exif data, the colour profile and anything else the original carried are not passed on: the picture is decoded to plain pixels and a new file is written from them.

Needs JavaScript. Runs only here.

This page turns a JPG into an ICO on your own machine. Every conversion on this page runs in your browser. The picture is read, drawn and written on your own machine, and the file is not sent to a server.

How do you convert a JPG to an ICO?

A photograph is squared, resampled to each icon size and packed into one container. The background stays opaque, because a JPG has no transparency to carry across.

  1. Choose the JPG file you want to convert. It is read inside this page, on your own machine.
  2. Choose which icon sizes to pack, and whether a rectangle is padded out to a square or cropped down to one.
  3. Select Convert to ICO. The page reads the first bytes of what came back and refuses the file if they are not ICO.
  4. Download the ICO. Nothing has been sent anywhere, so the file is ready as soon as it is written.

What Changes From JPG to ICO

JPG to ICO squares the photograph, resamples it to the icon sizes and packs them into one file. The background stays opaque, because a JPG has no transparency to carry across.

Each row below is one property of the picture: what it is in the JPG, what it becomes in the ICO, and whether it survives the trip. Convert a file and the same rows fill in with the measurements from your own picture.

What Changes From JPG to ICO
Property In the JPG In the ICO Verdict
Dimensions as the file has them resampled to 16, 32, 48, 256 px, one image each changed
Colour model and bit depth Y'CbCr, 8 bits per channel 32-bit ARGB, one PNG per entry — 8 bits per sample, whatever the source held changed
Alpha channel none — JPEG defines no alpha channel none — ICO can carry one, this picture has nothing to put in it not gained
Colours used up to 16,777,216 the same pixels kept
Animation frames 1 1 kept
Metadata (Exif, ICC) present in the file dropped — a new file is written from pixels lost
Compression lossy, discrete cosine transform (the baseline process) per entry — an uncompressed bitmap, or a complete PNG changed
File size the file you chose one file holding 4 images changed

the pixels survive; the Exif data does not.

What Travels With the Picture

What the two formats are, and what the browser does with a picture on the way between them. None of this depends on which JPG you bring.

How JPG and ICO Are Defined

How JPG and ICO Are Defined
Property JPGICO
Compression lossy, discrete cosine transform (the baseline sequential process); the standard also defines a separate lossless mode that web .jpg files do not usedepends on the entry - each image inside is either an uncompressed device-independent bitmap or, from Windows Vista, a complete PNG
Alpha channel none - neither T.81 nor JFIF defines an alpha or transparency channelyes - a PNG entry must be 32-bit ARGB and its mask is taken from the alpha channel; a bitmap entry carries a separate AND mask
Animation none - one image per filenone - the several images in an ICO are sizes of the same icon, not frames of an animation
In one sentence JPEG saves space by throwing detail away. The baseline process, which is what a .jpg file on the web uses, is lossy and cannot be undone, and the standard defines no transparency at all.An ICO file is a container. It holds several images at different sizes and colour depths, and software takes the one that suits the space it has to fill.
  • A JPG file begins FF D8 (SOI); a JFIF file follows it with FF E0 and the identifier 4A 46 49 46 00.
  • A ICO file begins 00 00 01 00 - a reserved word that must be zero, then the resource type, which is 1 for an icon.
  • JPEG is defined by ITU-T Rec. T.81 | ISO/IEC 10918-1 (JPEG); ITU-T Rec. T.871 | ISO/IEC 10918-5 (JFIF).
  • ICO is defined by no international standard; Microsoft documents the ICONDIR and ICONDIRENTRY structures.

PNG, GIF, WebP and ICO can carry transparency; JPEG cannot, because the standard defines no alpha channel, and a bitmap written here is opaque. Converting to a format without transparency fills the clear areas with a background colour.

One ICO file holds several images at different sizes and colour depths, and software picks the entry that suits the space it has. Common practice for a website icon is 16, 32 and 48 pixels, but no specification requires a particular set.

Converting a picture back to the format it came from does not return the original file. Whatever a step discarded stays discarded, and the return trip writes a third file.

The browser decodes the picture to plain pixels and writes a new file from them, so the Exif data, the colour profile and anything else the original carried are not passed on.

No browser writes ICO from a canvas. The icon directory and its entries have to be assembled in JavaScript, with each entry a PNG the canvas can produce.

What Makes a Good Icon Source?

Shape beats detail

An icon is read at 16 pixels across as often as at 256, and at that size a photograph becomes a smudge. A bold outline and two or three strong colours survive the shrink; faces and fine texture do not.

The background will be solid

none - neither T.81 nor JFIF defines an alpha or transparency channel, so nothing in the JPG marks a pixel as clear. Every entry this page writes is opaque from corner to corner.

Square it before you bring it

A rectangle has to become a square, and neither answer is free: padding leaves space beside the picture, cropping removes part of it. Cropping the JPG yourself first gives you the say over which part goes.

Common Mistakes

Frequently Asked Questions

How can I convert an image to an ICO file?

Choose the picture, pick the sizes to pack, and select Convert to ICO. This page builds the icon directory and its entries here, in the browser, and hands you one file holding all of them.

Can an icon made from a JPG have a transparent background?

Not from the JPG itself. ICO carries transparency, but a JPG has none to give, so every pixel arrives opaque. Start from a PNG if you need clear corners.

What happens to a rectangular photo when it becomes an icon?

It becomes square, either by padding the short side or by cropping the long one. This page lets you choose, and the whole picture only survives the first way. Crop it yourself first if the middle is not the part that matters.

The rest of the family sits on pick another image format pair.