File signature definition
File signature is a specific sequence of bytes in a file enabling programs to identify the file type without relying on the file extension. File signatures can help programs read a file when its extension has been changed or misidentified.
The benefits of a file signature
- Identify a file type. While file extensions are the most common way to identify a file type, a file signature can do this more accurately.
- Verify file integrity. A file signature helps verify the file’s integrity by ensuring the file was not tampered with. Especially important for software updates and digital certificates.
- Prevent malware. Criminals often try to disguise malicious files. An antivirus software can identify the file signature and help prevent malware.
- Improve efficiency. Operating systems can analyze the file signature and help pick the right software to open the file.
- Confirm compatibility. File signatures can help programs to determine whether a file is compatible with a particular device, operating system, or architecture.
Examples of file signatures
- The JPEG file signature is FF D8 FF E0
- The MP3 file signature is 49 44 33
- The signature of .zip and file formats based on it (EPUB, APK, DOCX) is 50 4B 03 04.