Save Bulk Gmail Attachments

What Is a DAT File? How to Open One Safely

By Ladislav Martincik — Founder & Developer, Save Bulk Gmail Attachments ·

Quick answer: A DAT file is a generic data file. Many different programs use the .dat extension, so there is no single app that opens every one. Open a copy in Notepad or TextEdit to see if it is readable text. A .dat attachment in an email from an Outlook user is usually winmail.dat, a package with the real attachments inside.

DAT is short for data. A game saves its progress in a .dat file, a program keeps its settings in one, and an old video CD stores its movies as .dat files. The extension says “some data” and nothing about the format. That is why double-clicking a DAT file usually gets you a “How do you want to open this file?” box.

What you’ll learn:

Here’s how to work it out.

Where DAT files come from

Adobe’s DAT file explainer says almost any program can create a DAT file, but the information inside is only relevant to the program that made it. The contents can be plain text, audio, video, or even a PDF.

Where you found the file is the biggest clue:

Where the DAT file isWhat it usually isWhat to do
Inside a program or game folderSettings, saved progress or data for that programLeave it alone. The program opens it by itself
On an old video CD (folder named MPEGAV)A video trackOpen it with a media player
Exported from a device or lab instrumentMeasurements or logs, often textOpen in a text editor or the device’s own software
Attached to an emailUsually winmail.dat or ATT00001.dat from OutlookSee the email section
Downloaded with a strange nameA file that lost its real extensionCheck the first characters (next section)

How to find out what is inside a DAT file

This check takes half a minute and is safe, because a text editor only displays the file. It does not run it.

  1. Make a copy of the DAT file, so you cannot damage the original.
  2. Right-click the copy and choose Open with.
  3. Pick Notepad on Windows or TextEdit on a Mac.

If you see words, numbers and settings you can read, the DAT file is a text file. You can read it, search it, or paste it into a spreadsheet.

If you see a wall of strange symbols, the file is binary. Look at the first few characters on the first line. Many file types start with a fixed signature that a text editor still shows:

First characters you seeReal file typeOpen it with
%PDF-PDF documentAny PDF reader, after renaming a copy to .pdf
PKZIP archive, or a Word, Excel or PowerPoint file (those are ZIP packages)Rename a copy to .zip and look inside
PNG (after one odd symbol)PNG imageAn image viewer, after renaming a copy to .png
JFIF or Exif near the startJPEG photoAn image viewer, after renaming a copy to .jpg
BEGIN:VCALENDARCalendar event (ICS)A calendar app. See what an ICS file is
BEGIN:VCARDContact card (VCF)A contacts app. See what a VCF file is
Nothing recognizableProgram data or a format without a text signatureThe program that created it

Rename a copy, never the original, and only when the first characters match. Renaming a file does not change what is inside it. If the signature does not match, the renamed copy just fails to open.

How to open a DAT file once you know the type

Adobe’s three common cases cover most files:

To pick the program on Windows, right-click the file, choose Open with, then Choose another app. On a Mac, right-click, choose Open With, then Other.

If the file belongs to a program you use, such as a game, an accounting tool or a device app, that program is the only one that will use it. Opening it elsewhere shows you data, not a document.

Got a .dat attachment in an email?

If the DAT file came by email, this section is for you. You expected a PDF or a spreadsheet, and Gmail shows winmail.dat, or a numbered file like ATT00001.dat.

Microsoft explains that Outlook packs messages sent in Rich Text format into a TNEF package called winmail.dat, and that some mail apps rename it to a generic name such as ATT00008.DAT. The sender’s real attachments are often inside it.

What works, in order:

  1. Ask the sender to resend in HTML. It is the fastest fix and you get the original files.
  2. Unpack it with a TNEF decoder that runs on your device, not an upload site.
  3. Ask the sender to fix it for good in Outlook’s mail format settings.

Our guide to winmail.dat in Gmail has the exact Outlook settings and a message you can send to the sender.

A text-editor check does not help much with winmail.dat, because TNEF is a binary format. You may still spot file names such as invoice.pdf among the symbols, a hint of what is packed inside.

To see how many of these you have, search Gmail for filename:dat (Google’s search operators list filename:). The Gmail search builder can add a sender or a date range. If a .dat attachment will not download at all, that is a different problem, covered in Gmail attachments not downloading.

Can you convert a DAT file to PDF?

Only when the DAT file holds something printable:

Online “DAT to PDF” converters upload your file. For work or personal documents, use the local methods above.

Is a DAT file safe to open?

Adobe notes that DAT files are not executable. They are data that a program reads. Opening one in Notepad or TextEdit only displays it.

The care goes to what you do next:

Can I delete DAT files?

Leave DAT files alone in program folders unless you know the program that uses them is uninstalled. Adobe gives the same rule of thumb. Deleting a DAT file a program still needs can reset its settings or saved data.

Email .dat attachments are different. Once you have the real files out, or the sender has resent the email, the winmail.dat copy has no further use.

If you want to keep the raw .dat attachments, for example to decode them later, Save Bulk Gmail Attachments saves the attachments of every email you select to a ZIP file or Google Drive in one step. It saves .dat files as ordinary files under their own name and does not unpack them.

Frequently Asked Questions

What is a DAT file?

A DAT file is a generic data file. Programs use the .dat extension for settings, saved data, logs or media. There is no single DAT format, so the file only makes sense to the program that created it.

How do I open a DAT file?

Find out what created it. Open a copy in Notepad or TextEdit: if it is readable text, you are done. If not, the first characters often reveal the real type, such as %PDF for a PDF.

Why did I get a .dat file in an email?

Most often the sender used Outlook with Rich Text format, which packs the message and attachments into winmail.dat. Some mail apps rename it ATT00001.dat. Ask the sender to resend in HTML.

Can I convert a DAT file to PDF?

Only if it holds something printable. A text DAT file can be opened in a text editor and printed to PDF. If it starts with %PDF it already is a PDF. Program data files cannot become a useful PDF.

Is a DAT file a virus?

No. A DAT file is data, not a program, so opening it in a text editor does not run anything. Be careful with what is packed inside, such as attachments in an email .dat file.

Can I delete DAT files?

Only if you know the program that uses them is gone. Programs store settings and data in DAT files, and deleting them can reset or break that program.