Windows EXE & DLL Magic Bytes (MZ / PE\0\0)
Windows Portable Executables (PE32 and PE32+ 64-bit)—covering applications (.exe), dynamic-link libraries (.dll), screensavers (.scr) and drivers (.sys)—begin with the 2-byte MS-DOS stub signature MZ (4D 5A, initials of DOS architect Mark Zbikowski) at offset 0, a 32-bit little-endian pointer at offset 60 (0x3C, e_lfanew), and the 4-byte signature PE\0\0 (50 45 00 00) at that pointed offset.
Signature & identification summary
| Detected format name | Windows executable |
|---|---|
| Hexadecimal magic bytes | 4D 5A … 50 45 00 00 |
| ASCII / marker preview | MZ … PE.. |
| Byte offset | 0 & e_lfanew |
| MIME type | application/vnd.microsoft.portable-executable |
| Common extensions & aliases | .exe, .dll, .scr, .sys, .cpl |
Check whether your file really is Windows PE (.exe).
Drop any file into File Sniff’s free local browser checker to verify its 4D 5A … 50 45 00 00 signature and spot misleading extensions—without uploading a single byte.
Container & byte-layout notes
Validating both MZ at byte 0 and PE\0\0 at e_lfanew prevents false positives on plain text starting with “MZ” while distinguishing modern Windows binaries from 16-bit DOS stubs.
Extension mismatches & common pitfalls
Security warning: malware authors routinely rename .exe or .scr binaries to Invoice.pdf.exe or disguise them as .pdf/.jpg attachments. If an unexpected document attachment shows MZ / PE\0\0 in our local checker, delete it immediately and never run it.
Which apps open Windows PE (.exe) files?
| Platform | Compatible applications & tools |
|---|---|
| Mac (macOS) | Inspect only (File Sniff Checker, Hex Viewer; Windows binaries do not execute natively on macOS) |
| iPhone & iPad | Inspect only |
| Windows | Windows OS loader (only run trusted, signed software; verify SHA-256 hash first) |
Free local tools & related guides
- Check whether a file really is Windows PE (.exe)
- Inspect raw bytes in the Hex Viewer
- Guide: How to Change a File Extension Safely
- Guide: How to identify an unknown file type
Inspect files & folders natively
on Mac, iPhone & iPad.
The native File Sniff app scans entire folders, spots extension mismatches, repairs extensions with Undo on Mac, and exports CSV or JSON reports locally.