Free webp to jpg
Apple-ICNS

Apple Icon Image

image/x-icns Released 2001 · by Apple Inc.

The image/x-icns MIME type represents the Apple Icon Image format (ICNS), the native icon format used by macOS (formerly Mac OS X). An ICNS file acts as a container that bundles multiple resolutions and color depths of an icon into a single file, ensuring applications look sharp on everything from legacy standard-definition displays to modern high-density Retina screens (ranging from 16x16 to 1024x1024 pixels). While early versions stored uncompressed raw pixel data with separate 8-bit alpha masks, modern macOS versions encapsulate standard PNG or JPEG 2000 streams within the ICNS chunks for higher resolutions.

Icons & UI Transparency Production Ready

Technical Specifications

MIME Type
image/x-icns
Extensions
.icns
Container
Chunk-based (OSType Header)
Compression
Uncompressed (Legacy) & PNG (Modern) & JPEG 2000 (Modern)
Algorithms
NoneDeflate (via embedded PNG)Wavelet (via embedded JP2)
Color Depth
1-bit (Monochrome), 4-bit, 8-bit, 24-bit (RGB), 32-bit (RGBA)
Metadata
ICC
Capabilities
Transparency
Animation
Progressive Loading
Alpha Channel
HDR Support
Official Specification
Aliases: image/icnsimage/mac-icns

Magic Bytes & HTTP Headers

File Signature (Magic Bytes)
69 63 6E 73
ASCII: icns
HTTP Headers
Content-Type: image/x-icns
Content-Type: image/icns
HTML Accept Attribute
accept="image/x-icns, .icns"

Browser Support Matrix

Browser Status Min Version
Chrome Chrome
Not Supported
Firefox Firefox
Not Supported
Safari Safari
Not Supported
Edge Edge
Not Supported
Internet Explorer Internet Explorer
Not Supported Legacy

Advantages & Limitations

Advantages
  • Seamlessly handles multi-resolution scaling on macOS, perfectly serving both standard and high-DPI (Retina) displays from a single asset
  • Modern versions efficiently embed standard PNG files, making it much easier to parse the high-resolution layers than the legacy raw pixel formats
Limitations
  • Strictly bound to the Apple ecosystem; completely useless natively on Windows, Linux, or the Web
  • The internal chunking structure is notoriously messy, utilizing dozens of different undocumented, legacy OSType tags spanning 20+ years of Apple history

Developer Code Snippets

import magic
# Libmagic natively detects the 'icns' magic byte signature
print(magic.from_file('app_icon.icns', mime=True)) # Outputs 'image/x-icns'
const fs = require('fs');
// Manually detecting the 'icns' magic bytes
const buffer = Buffer.alloc(4);
const fd = fs.openSync('app_icon.icns', 'r');
fs.readSync(fd, buffer, 0, 4, 0);
fs.closeSync(fd);
const isICNS = buffer.toString('ascii') === 'icns';
console.log('Is Apple ICNS:', isICNS);
import (
    "bytes"
    "net/http"
)
// Custom check for the ICNS Magic Bytes
// isICNS := bytes.HasPrefix(buf, []byte("icns"))
$mime = mime_content_type('app_icon.icns');
echo $mime; // Standard setups will often resolve this to 'image/x-icns' or 'image/icns'

File Detection Steps

How to programmatically detect a image/x-icns file by reading its raw bytes:

  1. 1 Check the first 4 bytes for the ASCII string 'icns' (Hex: 69 63 6E 73).
  2. 2 The next 4 bytes form a 32-bit big-endian integer representing the total file size in bytes.
  3. 3 The rest of the file consists of data chunks, each starting with a 4-byte OSType identifier (e.g., 'ic08' for a 256x256 icon) and a 4-byte chunk length.

Software Support

A
Apple Preview
X
Xcode (iconutil)
ImageMagick ImageMagick
GIMP GIMP

Conversion Tools

Share & Embed

Markdown Badge
Apple-ICNS Format Badge
[![Apple-ICNS Format](https://freewebptojpg.com/mime/image/apple-icns/badge.svg)](https://freewebptojpg.com/mime/image/apple-icns)
Interactive iframe Widget
<iframe src="https://freewebptojpg.com/mime/image/apple-icns/embed" width="100%" height="280" style="border:1px solid #cbd5e1;border-radius:8px;" title="Apple-ICNS Specs"></iframe>

JSON API

All data on this page is available as a free, open JSON API. Use it in your project, documentation, or tooling.

GET https://freewebptojpg.com/mime/image/apple-icns.json Open JSON
Free to use
No auth required
CORS enabled
Use from any domain
Cached 24h
Cache-Control headers set

Frequently Asked Questions

What is an ICNS file?

An ICNS file is the standard icon format used by Apple's macOS. It stores multiple sizes of an icon inside a single file so the operating system can seamlessly switch to the appropriate resolution depending on the display (e.g., standard vs. Retina) or context (e.g., Finder vs. Dock).

How do I create an ICNS file?

Developers typically create ICNS files using Apple's Xcode via an '.iconset' folder, or through command-line utilities like 'iconutil' on macOS. There are also third-party tools and web converters that can compile a set of PNGs into an ICNS file for Windows or Linux users.

Can I use an ICNS file as a favicon on a website?

No. Web browsers do not natively support the ICNS format. You must convert it to an ICO, PNG, or SVG file to use it as a website favicon.

Related Formats

Share this format