.mach File Extension

Learn what a .mach file is, how to inspect Mach-O binaries safely, what Poly supports, and why most Mach-O files use other names.

File extension details for .mach

Storage Only
File typeMach-O binary
MIME type
EncodingBinary Mach-O object or fat container
Operating systemsmacOS, Linux, Windows
Opens withApple otool, LLVM llvm-objdump, Ghidra
Poly supportYes. Poly stores, syncs, shares, versions, and downloads .mach files.
Indexed by PolyName only. Poly indexes the filename and ordinary file properties.
Preview in PolyNo. Download the file and inspect it with a trusted static-analysis tool.
Poly agentNo. The Poly agent cannot read the binary's contents.

What kind of file is a .mach?

A .mach file is conventionally a Mach-O binary, the native executable and object format used on Apple platforms. It may contain an executable, relocatable object, dynamic library, loadable bundle, debug data, or another loader-defined file type.1

The suffix is uncommon. Most Mach-O executables have no extension, while object files often use .o and dynamic libraries use .dylib. A .mach name therefore provides a clue, not proof of the contents. Check the first four bytes:

SignatureLikely content
CE FA ED FELittle-endian 32-bit Mach-O
CF FA ED FELittle-endian 64-bit Mach-O
FE ED FA CE or FE ED FA CFByte-swapped Mach-O
CA FE BA BEFat or universal binary, or possibly a Java class file

Apple's headers define these magic values.23 Because CA FE BA BE is ambiguous, a tool must also validate the fields that follow it.

Treat an unfamiliar .mach file as executable content. Renaming it does not make it safe or convert it to another binary format.

How do I open a .mach on my computer?

Do not double-click an unknown .mach file. Inspect it without running it:

  • On macOS, use file, otool -hv, otool -l, or codesign --verify --verbose in Terminal.
  • On macOS, Linux, or Windows, use LLVM's llvm-objdump --macho --private-headers or a cross-platform reverse-engineering tool such as Ghidra. LLVM documents Mach-O-specific inspection options for headers, load commands, symbols, and disassembly.4

A binary runs only when its architecture, target Apple platform, minimum OS version, libraries, and signing requirements are compatible. Windows and Linux do not natively run macOS Mach-O executables.

Poly support for .mach

Poly stores, syncs, shares, versions, and downloads .mach files. They remain searchable by filename and ordinary file properties.

Poly does not preview or execute the binary, extract architectures or symbols, index embedded code, or send its contents to the Poly agent. If you want searchable analysis beside the original, save trusted otool or llvm-objdump output as a separate text file.

History of .mach

Mach-O grew from Carnegie Mellon University's Mach work and was refined for NeXT's operating system. NeXTSTEP used Mach object files in place of the older a.out format, and Apple later adopted Mach-O as the native executable format for Mac OS X and its descendants.5

The de facto MIME type application/x-mach-binary is not registered by IANA.6 Generic systems may instead label the data application/octet-stream. The .mach suffix is similarly a convenience rather than the standard naming convention for most Apple executables.

Working with .mach and alternatives

There is no general conversion from .mach to a Windows PE or Linux ELF executable. Rebuild from source for the target operating system and CPU instead. Use lipo or llvm-lipo to inspect or extract architecture slices, and otool, nm, or llvm-objdump to produce a text report.

Keep the signed original when provenance matters. Editing bytes, load commands, or architecture slices can invalidate its code signature. A disassembly can reveal machine instructions, but it cannot restore the original source names, comments, types, or build settings.

Footnotes

  1. Apple Open Source. mach-o/loader.h.
  2. Apple Open Source. mach-o/loader.h constants.
  3. Apple Open Source. mach-o/fat.h.
  4. LLVM Project. llvm-objdump: LLVM's Object File Dumper.
  5. NeXT Computer. Mach Object Files. See also Apple, Overview of the Mach-O Executable Format.
  6. Internet Assigned Numbers Authority. Media Types Registry. The application registry has no application/x-mach-binary entry.
© Poly Corp. 2026