A Uniform Type Identifier (UTI) is a unique string that macOS uses to identify the type of a file or piece of data, such as public.jpeg, com.adobe.pdf or public.plain-text. Instead of relying only on filename extensions, macOS maps every file to a UTI and uses it to decide which app opens it, which icon Finder shows and how Quick Look and Spotlight handle it.
In everyday work with Finder and files, UTIs stay invisible, yet they drive features such as Open With, the default-app choice in Get Info and the file type filters in open and save dialogs. Understanding them helps explain why a file opens in an unexpected app and how developers declare new document formats correctly.
How a Uniform Type Identifier is structured
A UTI uses reverse-DNS notation, which keeps identifiers unique without a central registry. Apple reserves the public domain for system-defined common types, the com.apple domain for Apple-specific formats, and each vendor uses its own domain, for example com.microsoft.word.doc.
Each UTI is linked to one or more tags, which are the older type labels that the system translates into UTIs. The table below lists the main tag classes.
| Tag class | Example value | Where it comes from |
|---|---|---|
| Filename extension | jpg, jpeg | The end of the file name |
| MIME type | image/jpeg | Web servers and email attachments |
| OSType code | JPEG | Classic Mac OS type codes |
| Pasteboard type | Legacy clipboard names | Copy and paste between apps |
When macOS meets a tag that no installed app or system declaration recognizes, it creates a dynamic UTI beginning with dyn., which encodes the original tag. Seeing such an identifier is a reliable sign that no app has declared that type.
Conformance and the type hierarchy
The most powerful feature of UTIs is conformance, a form of inheritance between types. public.jpeg conforms to public.image, which conforms to public.data and public.content. An app that declares it can open any image therefore accepts JPEG, PNG and HEIC files without listing each one.
Apple describes two parallel hierarchies: the physical hierarchy says what an item is on disk, and the functional hierarchy says what kind of content it holds. The following table shows representative types in both.
| Identifier | Conforms to | Hierarchy role |
|---|---|---|
| public.item | Nothing (root) | Physical base of all items |
| public.data | public.item | Physical: a byte stream file |
| public.directory | public.item | Physical: a folder |
| com.apple.package | public.directory | Folder shown as one file, such as an app bundle |
| public.content | Nothing (root) | Functional base of document content |
| public.text | public.data, public.content | Any textual content |
| public.plain-text | public.text | Unformatted text such as TXT files |
Conformance is multiple inheritance: a type may conform to several parents. A PDF document, for instance, is both data and composite content, so tools that accept either category can work with it.
How macOS uses UTIs in Finder and apps
Launch Services maintains a database that links every UTI to the apps able to handle it. When a user double-clicks a document, Finder resolves the file’s UTI, looks up the preferred handler and launches it. Choosing Change All in the Get Info window rebinds the default app for that whole UTI, not just for one extension.
The same identifier steers many other system services, summarized below.
| Feature | Role of the UTI | Visible result |
|---|---|---|
| Open With menu | Lists apps that declare the type or a parent | Suggested apps for a file |
| Quick Look | Selects the preview extension | Space bar preview in Finder |
| Spotlight | Selects the metadata importer | Searchable document contents |
| Open and save panels | Filters allowed file types | Grayed-out incompatible files |
| Drag and drop | Describes data offered by the source | Whether the target accepts a drop |
In Terminal, the command mdls -name kMDItemContentType shows a file’s UTI, and kMDItemContentTypeTree lists its full conformance chain, which is useful when diagnosing why a file opens in the wrong app.
Declaring types as a developer
Apps declare types in their Info.plist. An exported type declaration (UTExportedTypeDeclarations) states that the app owns and defines a format. An imported type declaration (UTImportedTypeDeclarations) describes a format owned by someone else so the app can use it even if the owner is not installed.
Document handling is declared separately in CFBundleDocumentTypes, which lists the UTIs the app can open and its handler rank. Since macOS 11, the UniformTypeIdentifiers framework and its UTType structure give modern Swift code a type-safe way to work with identifiers and conformance checks.
A good declaration includes a human-readable description, an icon, the correct parent types and every relevant tag, such as all common extensions and the registered MIME type. Missing tags are a typical reason why files downloaded from the web or received by email are not recognized even though the app is installed, because the incoming tag cannot be matched to the declared identifier.
Common problems and misconceptions
The most frequent misconception is that renaming the extension changes the format. Renaming a file only changes the tag, so macOS assigns a different UTI while the bytes remain the same, which can cause an app to reject or misread the file.
- Conflicting declarations: two apps exporting the same identifier can make icons and defaults unstable.
- Stale Launch Services data: removed apps may still appear in Open With until the database refreshes.
- Dynamic UTIs in logs usually mean a missing or incorrect type declaration.
- Overly broad declarations, such as claiming
public.data, make an app appear for every file.
Developers should export only formats they own and import all others, keep identifiers stable across versions, and declare precise parent types so conformance behaves predictably.
In simple terms
Every file on a Mac has a hidden label that says what kind of file it is. That label is the Uniform Type Identifier. It looks like a short address, such as public.jpeg for a photo.
Labels are grouped like a family tree. A JPEG is a kind of image, and an image is a kind of data. This family tree lets macOS choose the right app for each file. It also decides which icon and preview you see in Finder.
A practical example
A video editor on macOS receives project files with an unusual .prproj extension from a colleague. Double-clicking them opens a text editor instead of the editing app. Running mdls in Terminal shows a dynamic UTI starting with dyn., which means no installed app has declared the format.
After the editor installs the correct application, its Info.plist exports the proper identifier and Launch Services registers it. The files now show the right icon, Quick Look displays a thumbnail, and selecting Change All in Get Info confirms the editing app as the default. The problem is solved without renaming any file, because the fix targeted the type declaration rather than the extension.