File types / Programs & scripts

.exe file

Windows executable (PE)

Extensions
.exe, .dll, .sys
MIME type
application/vnd.microsoft.portable-executable
Signature
4D 5A  (MZ)at byte offset 0
Safety
Can run code

What is a .exe file?

EXE files are Windows programs. DLL and SYS files use the same Portable Executable layout, so they also start with the two letters MZ, the initials of the format's designer Mark Zbikowski.

Because the signature is only two bytes and the extension can be changed freely, a program can be disguised as a document or image. Checking the first bytes is a fast way to catch that.

Used for: Programs and libraries on Windows.

How can I tell if a file is really a EXE?

Read its first bytes rather than trusting the name. A genuine EXE file has the signature 4D 5A (MZ) at byte offset 0. The File Identity tool reads these bytes in your browser, so the file is never uploaded.

To compare the name against the content, use Validate Extension. To see the raw bytes, use Safe File Preview.

Is a .exe file safe to open?

An executable can do anything the user can. If a file that should be a picture or document starts with MZ, do not open it.

Easy to confuse

Double extensions like report.pdf.exe rely on Windows hiding known extensions.