Free ICO test files and sample generator
Container holding an image at several small sizes. Used for application and website favicons.
What is a .ico file?
ICO: Windows Icon. An ICO file is a container of one or more icon images, used for Windows application icons and browser favicons. The entries are DIB images with a mask, which is a different structure from a standalone bitmap.
Why generate a test ICO file?
- Test favicon handling in a site or browser-extension build.
- Verify a Windows resource or installer step accepts the icon.
- Check multi-size icon extraction.
What you can put inside a .ico file
You get 3 content options for ICO, so the file holds something meaningful rather than random padding: Solid color, Gradient, Checkerboard. For ICO these are alternatives, so choose the one that matches what you need to test.
How a .ico file is identified
Every .ico file begins with 00 00 01 00, an icon directory, type 1. That is what a validator inspecting content rather than the file name looks for.
How the size lands on the exact byte
Padding trails after the icon's pixel data, beyond the length the directory declares.
Negative testing with broken ICO files
- Invalid. Identifiable, but wrong inside, so it fails during parsing.
- Corrupted. The leading bytes are destroyed, so the
00 00 01 00identifying a .ico is gone. Same length as the valid file. - Incomplete. Truncated part-way, so it is genuinely shorter.
- Empty. Chosen under Content rather than File Condition: valid structure, no data.
Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation.
Sample ICO content
[Icon], 16×16, 32×32, 48×48.
This shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.
How to open and verify the file
Set as a favicon, view in Windows Explorer, or open with IrfanView / GIMP.
Media type image/x-icon · extension .ico · category Images
Generate a .ico file → · questions about sizes, privacy or cost are answered on the site FAQ.
Frequently asked questions about ICO files
What identifies a .ico file?
A .ico file begins with the bytes 00 00 01 00, an icon directory, type 1. Those bytes are what a content-sniffing validator looks for, and what the Corrupted condition destroys.
How can a .ico file be an exact number of bytes?
Padding trails after the icon's pixel data, beyond the length the directory declares.
What can go inside the ICO file?
There are 3 content options for .ico: Solid color, Gradient, Checkerboard. For ICO these are alternatives, so pick the one matching what you need to test.
Can I download several broken ICO files at once?
Yes, select more than one File Condition and you get one ZIP containing a .ico per condition, each named after its condition.
Can the ICO file use UTF-16 or a byte-order mark?
No, and deliberately. A .ico file is a container rather than plain text, so rewriting its bytes as UTF-16 would not produce a UTF-16 document. It would produce a broken file. Use a text format such as CSV, JSON or XML for encoding tests.
How do I open or verify the ICO file?
Set as a favicon, view in Windows Explorer, or open with IrfanView / GIMP.