What is a DAT file?
DAT (Data) is a generic file extension used by many different applications to store data. The content and format of a DAT file depends entirely on the application that created it — it could contain plain text, binary data, configuration settings, or even media. Unlike formats such as PDF or MP3, .dat has no single universal specification; it is simply a convention for “data file.”
Because any program can create a .dat file with any internal structure, opening one requires knowing which application produced it. The file’s internal magic bytes (the first few bytes of the file) can often reveal the true format.
How to open DAT files
- Identify the source application first — check which program created the file
- Notepad / VS Code — Try opening as text; readable content will appear if it’s text-based
- HxD (Windows) — Hex editor for inspecting raw binary content and magic bytes
- VLC Media Player — If the file is a
VIDEO_TS.dator VCD-format video - Microsoft Outlook — For
winmail.datattachments (TNEF-encoded email attachments) - File utility (Linux/macOS) — Run
file filename.datto auto-detect the format
Technical specifications
| Property | Value |
|---|---|
| Format | Application-specific (no universal spec) |
| Content | Text, binary, or mixed |
| Structure | Varies by creator |
| Common Sources | Outlook, games, system tools, databases |
| MIME type | application/octet-stream (generic binary) |
| Magic bytes | Varies — no fixed signature |
Common use cases
- Email attachments:
winmail.datfiles are created by Microsoft Outlook when sending rich-text emails to non-Outlook clients. They use the TNEF (Transport Neutral Encapsulation Format) encoding. - Game save data: Many video games store save states and progress in
.datfiles (e.g.,save.dat,player.dat) - System files: Windows and Linux system utilities create
.datfiles for internal state (e.g., Prefetch data atC:\Windows\Prefetch\) - Application data: Software installers, databases, and backup tools use
.datfor proprietary storage - Minecraft: Player and chunk data are stored in
.datfiles using the NBT (Named Binary Tag) format
Identifying the real format
If you have an unknown .dat file, these steps help identify its true format:
- Open in a hex editor: Look at the first 4–8 bytes. Common signatures include
PK(ZIP),%PDF(PDF),FFD8FF(JPEG). - Try renaming the extension: If you know the source application, rename to the expected format (e.g.,
.dat→.mp4) - Use the
filecommand: On Linux/macOS,file unknown.datuses magic byte detection to identify file types - Check file size: Very small files (< 1 KB) are often text-based config or log data
Security considerations
DAT files from unknown sources should be treated with caution. Because the extension reveals nothing about the content, malicious executables or scripts are sometimes distributed with a .dat extension to bypass file-type filters. Always scan .dat files from untrusted sources with antivirus software before opening them. Never rename a .dat file to .exe and run it unless you fully trust the source.
winmail.dat specifically
winmail.dat is the most commonly encountered .dat file by everyday users. It appears as an email attachment when Outlook sends messages in RTF format to recipients who use Gmail, Apple Mail, or other non-Outlook clients. Recipients can decode it using tools like TNEF’s Enough (macOS), Winmaildat.com (online), or Letter Opener (iOS).