.dat

What is a .dat file?

Generic Data File · Data · Various · n/a

DAT is not really one format. It is a generic label programs slap on their own data files, so a .dat could be anything from game data to an email attachment. What opens it depends entirely on which program created it.

Category
Data
Type
Binary
Is a .dat file safe to open? Depends entirely on the contents. A .dat that is really plain text or video is harmless; one that is really an executable is not. Do not run a .dat, and inspect an unexpected one (or drop it into the identifier) before trusting it.

What is a .dat file used for?

The .dat extension just means data. It carries no promise about the contents, so two DAT files from two programs can be completely unrelated. There is no fixed magic-byte signature, which is exactly why one .dat needs a totally different program from another.

The most common source of frustration is winmail.dat. Microsoft Outlook can send mail in a proprietary format called TNEF, and when the receiving app does not understand it, the whole message gets wrapped into a single attachment named winmail.dat. Your real attachments (the PDF, the images) are trapped inside it.

Other everyday cases: application settings and cache, game data and saves, exported data blobs, and older Video CD movie files (named like AVSEQ01.DAT) that are really MPEG video you can play in VLC.

The honest way to open a DAT is to work out what it actually is. Drop it into the WhatFileType identifier, or open it in a text editor: if the first bytes look like readable text or a known header, that tells you the real format. If it is genuinely a program's private data, only that program can read it.

To identify a mystery .dat yourself, look at its first bytes in a hex viewer and compare them against a signature reference. If they read 25 50 44 46 it is a PDF renamed, 50 4B 03 04 means a ZIP (or an Office file), and FF D8 FF is a JPEG. If the bytes are all readable text, it is likely a config or log file you can open in any editor. Only when the bytes match nothing known is the file truly a program's private format.

Two very common cases are worth naming. WhatsApp stores some media and message data as encrypted .dat files that only WhatsApp itself can read, so there is no general viewer for those. And many .dat files are simply application cache or settings sitting in a program's folder; you rarely need to open those by hand, and deleting one usually just makes the program rebuild it.

How to open a .dat file

The .dat format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list. For a step-by-step walkthrough, see how to open a .dat file.

Windows

  • The program that created it
  • VLC (if it is VCD video)
  • a winmail.dat reader (for Outlook TNEF)
  • text or hex editor (to inspect)

macOS

  • The originating program
  • VLC (if it is VCD video)
  • TNEF's Enough (for winmail.dat)
  • text or hex editor

Linux

  • The originating program
  • VLC (if it is VCD video)
  • tnef (command line, for winmail.dat)
  • hex or text editor

Web

  • Online winmail.dat extractors (for Outlook attachments)

How to convert a .dat file

You can convert a .dat file to Depends on the actual contents using a conversion tool or the export menu of an app that opens it.

.dat file signature (magic bytes)

Programs recognise a .dat file by the bytes at the start of the file, not by its name. These are the signatures for DAT.

Hex signatureOffsetNote
(no fixed signature)0no fixed signature; contents depend entirely on the program

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .dat file?

DAT is not really one format. It is a generic label programs slap on their own data files, so a .dat could be anything from game data to an email attachment. What opens it depends entirely on which program created it.

How do I open a DAT file?

Find out which program created it and open it there. If you received a winmail.dat by email it is an Outlook TNEF attachment, so use a winmail.dat reader to extract the real files. If it plays as video (a VCD .dat), open it in VLC. When in doubt, drop it into the identifier or open it in a text editor to spot the real format.

What is winmail.dat and how do I open it?

winmail.dat is how Microsoft Outlook packages a message and its attachments in the proprietary TNEF format when the receiving app cannot read it. Your real files are inside. Extract them with a winmail.dat reader such as TNEF's Enough on Mac, the tnef command on Linux, or an online winmail.dat extractor. The lasting fix is asking the sender to switch Outlook from Rich Text to HTML or plain text.

Is a DAT file a virus?

Not by itself. DAT is just a label, so most are harmless data. The risk is only if a .dat is actually an executable in disguise. Never run one, and check what it really is (the identifier or a hex editor will tell you) before opening an unexpected .dat.

What program opens a DAT file?

There is no single answer. DAT is a generic label, so the right program is whichever one produced the file. Opening it in a text editor, or checking its first bytes, usually reveals the real format.

How do I open a WhatsApp .dat file?

You usually cannot open it directly. WhatsApp stores certain media and message data as encrypted .dat files that only the app can read, tied to your account and phone. There is no general viewer; the data is meant to be restored through WhatsApp itself, not opened by hand.

Why do I have .dat files on my computer?

Most are application cache, settings or data that programs create in their own folders. You rarely need to open them, and they are not junk to clear out blindly, since the app that made a .dat is the one that relies on it.

Related formats

Sources

Details on this page were checked against authoritative references: