PNG to ICO Converter
- 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.
- An animated PNG comes through as one picture — the image the format names as its default, or the first frame where it names none.
Needs JavaScript. Runs only here.
This page turns a PNG 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.
Going the other way? Convert ICO back to PNG →
How do you convert a PNG to an ICO?
An ICO is a container. The PNG is resampled to each icon size you ask for, and those pictures are packed into one file with the transparency carried through.
A PNG converted to ICO is resampled to the icon sizes and packed into one file. An ICO holds several images at once and carries transparency through, so a square PNG with a clear background gives the best result.
- Choose the PNG file you want to convert. It is read inside this page, on your own machine.
- Choose which icon sizes to pack, and whether a rectangle is padded out to a square or cropped down to one.
- Select Convert to ICO. The page reads the first bytes of what came back and refuses the file if they are not ICO.
- Download the ICO. Nothing has been sent anywhere, so the file is ready as soon as it is written.
What Changes From PNG to ICO
PNG to ICO resamples the picture to the icon sizes and packs them into one file, carrying the transparency through. A square PNG with a clear background gives the best result.
Each row below is one property of the picture: what it is in the PNG, 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.
| Property | In the PNG | 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 | RGB with alpha, 8 bits per channel | 32-bit ARGB, one PNG per entry — 8 bits per sample, whatever the source held | changed |
| Alpha channel | present | carried through unchanged | kept |
| Colours used | up to 16,777,216 | the same pixels | kept |
| Animation frames | 1, or several — PNG can carry an animation | 1 — the format’s default image, or the first frame where it names none | changed |
| Metadata (Exif, ICC) | present in the file | dropped — a new file is written from pixels | lost |
| Compression | lossless, deflate | 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.
Going Back to PNG
Converting back does not restore what this step dropped, so convert the ICO result back to PNG only when you need a PNG file.
The change above runs one way — go back from ICO to PNG writes a new file, not the original.
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 PNG you bring.
How PNG and ICO Are Defined
| Property | PNG | ICO |
|---|---|---|
| Compression | lossless - deflate with a sliding window of at most 32768 bytes (compression method 0) | depends on the entry - each image inside is either an uncompressed device-independent bitmap or, from Windows Vista, a complete PNG |
| Alpha channel | yes - a full alpha channel on colour types 4 and 6; a tRNS chunk gives a transparent colour key on types 0 and 2 and per-entry alpha on type 3 | yes - 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 | yes - APNG is normative in the Third Edition, using the acTL, fcTL and fdAT chunks | none - the several images in an ICO are sizes of the same icon, not frames of an animation |
| In one sentence | PNG stores a picture without losing anything: the specification defines lossless as reconstructing the original data exactly, bit for bit. It carries an alpha channel, and since the Third Edition it can carry frame-based animation as well. | 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 PNG file begins 89 50 4E 47 0D 0A 1A 0A.
- 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.
- PNG is defined by PNG Specification (Third Edition), W3C Recommendation 24 June 2025; the Second Edition is ISO/IEC 15948:2004. The Third Edition is not itself an International Standard..
- 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.
PNG allows bit depths of 1, 2, 4, 8 and 16, and five colour types: greyscale, truecolour, indexed-colour, and each of greyscale and truecolour with alpha. Not every depth is legal for every type.
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.
Which Icon Sizes Do You Need?
The sizes in common use
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.
Why 256 is worth including
Because a desktop shows an icon far larger than a browser tab does, and scaling a 16-pixel picture up to fill that space looks exactly as rough as it sounds. The large entry costs bytes only when something asks for it.
What the picture should look like
Square, and simple. Fine detail disappears at 16 pixels whatever the source held, so a shape that survives being small is worth more here than a photograph is.
Common Mistakes
- Bringing a wide picture and expecting it left alone. An icon entry is square, so a rectangle is padded out or cropped down.
- Packing only the largest size. Software picks the entry that suits the space, and a missing small one gets scaled down for it.
- Expecting the browser to write the container. It cannot; this page assembles the directory and the entries itself.
Frequently Asked Questions
How to create an .ICO file?
Choose a square PNG, pick the sizes you want packed, and select Convert to ICO. The entries are built here and written into one file you can download.
What sizes should an ICO file contain?
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.
Does an ICO keep the PNG's transparency?
Yes. Each entry is written as a complete PNG with a full alpha channel, so a clear background and a soft edge both come through.
Does the PNG have to be square?
It is easier if it is. An icon entry is square, so a rectangle is either padded out with space beside the picture or cropped down to the middle of it. You choose which.
You can, but the round trip is not the file you started from: the ICO to PNG direction.
Related Conversions
The rest of the family sits on the image conversion index.