Your computer identifies files using everything from hidden name suffixes to internal magic numbers.
In short: A file format is simply a method for encoding information, but how your operating system knows what to do with that data is a complex, often invisible, battle. From simple filename extensions to internal magic numbers and metadata, systems use various strategies to ensure your files open correctly.
At its core, a file format is the structural blueprint for how data is organized, whether it is a low-level byte layout or a high-level markup structure. Because no universal standard exists, formats often rely on specific identification methods. The most common is the filename extension, like .jpg or .html. While intuitive, this system is inherently fragile; users can accidentally break files by renaming them, and malicious actors can hide dangerous executables behind innocent-looking extensions, a risk exacerbated when systems hide these suffixes by default.
To bypass the limitations of extensions, many systems use internal markers. A 'magic number' is a specific, identifiable sequence of data located at the start of a file that acts as a unique signature. For instance, GIF images begin with the ASCII characters 'GIF87a' or 'GIF89a'. While more reliable than extensions, magic numbers require the system to scan file contents, which increases latency and computational overhead. Some systems, like the classic Mac OS, opted for separate metadata stored in the file system directory, using 4-byte 'OSTypes' to define both the file format and the default application for opening it.
Modern approaches have evolved toward more robust, hierarchical systems. Apple’s Uniform Type Identifiers (UTIs) use reverse-DNS strings, such as 'public.png', to categorize files within a flexible, multi-layered structure. Other systems, like those using the NTFS or Unix-based filesystems, utilize 'extended attributes'—arbitrary name-value pairs attached to files. These methods provide greater precision than simple extensions, though they often trade off portability, as moving files between different filesystems can strip away the metadata required for the operating system to recognize the file's true nature.
Opens the Intellect+ feed with this card first. Swipe up for the next one.
Sources
- Summary by Intellect · source: File format
To cite this card, link to https://intellectplus.co.uk/app/technology-file-format.
How we source, check and correct cards: Editorial standards.
General information, not professional advice. Spotted an error? Flag the card or see corrections and complaints.
Intellect Plus is a visual educational discovery platform for exploring fascinating facts and ideas. Brain Food, Not Brain Rot. What is Intellect Plus?
Related
More in Computing and information technology · More in Technology · Latest · A–Z · All topics