Adobe Portable Document Format

application/octet-stream

Safe

Magic Bytes

Offset: 0
25 62 69 74 6D 61 70

Adobe Illustrator Artwork (AI) is a proprietary vector graphics format developed and maintained by Adobe Systems using the Portable Document Format (PDF) architecture. It is the primary format used by graphic designers to create scalable logos, illustrations, and complex print layouts that require resolution independence. While modern versions utilize this PDF structure for compatibility, early iterations were based on legacy PostScript standards; though generally safe, users should exercise caution with files containing embedded scripts or external references.

Extension

.ai

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .ai files in Python

Python
def is_ai(file_path: str) -> bool:
    """Check if file is a valid AI by magic bytes."""
    signature = bytes([0x25, 0x62, 0x69, 0x74, 0x6D, 0x61, 0x70])
    with open(file_path, "rb") as f:
        return f.read(7) == signature

How to validate .ai files in Node.js

Node.js
function isAI(buffer: Buffer): boolean {
  const signature = Buffer.from([0x25, 0x62, 0x69, 0x74, 0x6D, 0x61, 0x70]);
  return buffer.subarray(0, 7).equals(signature);
}
Go
func IsAI(data []byte) bool {
    signature := []byte{0x25, 0x62, 0x69, 0x74, 0x6D, 0x61, 0x70}
    if len(data) < 7 {
        return false
    }
    return bytes.Equal(data[:7], signature)
}

API Endpoint

GET /api/v1/ai
curl https://filesignature.org/api/v1/ai

Related Formats