.fw files.wiki
DAT

DAT Files

Generic Data File

.DAT is a shared extension for generic application data and several unrelated binary formats such as VCD video and Winmail.dat.

Generic application data file

Most common
Developer
Various
Category
Data & Text
MIME type
application/octet-stream
Format
Binary

Video CD MPEG-1 stream DAT file

Developer
Philips, Sony, Matsushita, JVC
MIME type
video/mpeg
Format
Binary
Magic bytes
00 FF FF FF FF FF FF FF FF FF FF 00
First released
1993
Latest version
Video CD 2.0
Open standard
Yes

Microsoft TNEF Winmail.dat attachment

Developer
Microsoft
MIME type
application/ms-tnef
Format
Binary
Magic bytes
78 9F 3E 22
First released
1990
Open standard
No

Minecraft level.dat / NBT data file

Developer
Mojang Studios
MIME type
application/octet-stream
Format
Binary
Magic bytes
1F 8B
First released
2009
Latest version
Named Binary Tag
Open standard
No

Bitcoin Core wallet.dat Berkeley DB wallet

Developer
Bitcoin Core project
MIME type
application/octet-stream
Format
Binary
Magic bytes
00 05 31 62 @ offset 12
First released
2009
Latest version
Berkeley DB 4.8 wallet format; descriptor wallets also exist
Open standard
Yes

Plain text or delimited data saved as .dat

Developer
Various
MIME type
text/plain
Format
Text

SQLite database using .dat extension

Developer
D. Richard Hipp / SQLite Consortium
MIME type
application/vnd.sqlite3
Format
Binary
Magic bytes
53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 00
First released
2004
Latest version
SQLite 3
Open standard
Yes

Windows NT registry hive DAT file, including NTUSER.DAT

Developer
Microsoft
MIME type
application/octet-stream
Format
Binary
Magic bytes
72 65 67 66
First released
1993
Latest version
Registry hive format used by current Windows releases
Open standard
No

Game/application resource archive with .dat extension

Developer
Various game and software developers
MIME type
application/octet-stream
Format
Container
Open standard
No

Internet Explorer index.dat cache/history database

Developer
Microsoft
MIME type
application/octet-stream
Format
Binary
Magic bytes
43 6C 69 65 6E 74 20 55 72 6C 43 61 63 68 65 20 4D 4D 46 20 56 65 72
First released
1995
Latest version
Internet Explorer 11 legacy cache format
Open standard
No

Online .DAT Text Viewer

Reading file…

What is a .DAT file?

.DAT File Format Extension is no particular standardized format. It just denotes "data" and was adapted to operating systems, games and emails programs and databases. The program the file was created under is often the right program and gives further clue on filename's nature along with adjacent data. There exist a few categories of .dat files: there could be a text table file, some sort of binary storage for applications, or databases. For easy and quick identification there might be specific "magic bytes": SQLite files start from "SQLite format 3"; TNEF in Winmail.dat from "78 9F 3E 22"; gzip-compressed level.dat files from Minecraft have prefix "1F 8B"; registries from Windows NTUSER.dat start from 72 65 67 66 (regf)

There are many kinds of dat-files, though. AVSEQnn. DAT are files of MPEG-1 format of video CD tracks placed into "mpegav" directory in order. Outlook and Exchange programs may send Winmail.dat (tnef). Minecraft game places information about game world metadata, including the starting point and its properties, as well as about players, into its own Level. DAT file. Bitcoin Core uses wallet.dat file for private keys and wallet metadata. NTUSER.DAT in user folders of Windows corresponds to its registry file. index.dat was used for cache and history records in older Internet Explorer builds.

How to open a .DAT file

Open a .DAT file on Windows

  1. 1 Go to the folder with your file in File Explorer. Usually, downloaded files end up in Downloads.
  2. 2 Double-click your .DAT file if you have an app for .dat files on your computer. In case it does not open, move on to step three.
  3. 3 Right-click your .DAT file -> select Open with -> Choose another app.
  4. 4 Choose a suitable app in the list (Windows 11: choose Always). For Windows 10 -> put a check on "Always use this app to open .dat files" and click OK.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Windows

Open a .DAT file on macOS

  1. 1 In the Finder app, locate your .DAT file.
  2. 2 Just double-click your .DAT file in order to automatically launch the program which is connected with it.
  3. 3 Need another app on your Mac? Control-click the file (or right-click with a mouse). In the pop-up menu select Open With -> a suitable app.
  4. 4 If it isn't in the list, choose Other… and find the application manually.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for macOS

Open a .DAT file on Linux

  1. 1 Launch your file manager. Depending on the desktop it may be named Files (GNOME), Dolphin (KDE Plasma), Nemo (Cinnamon) or Thunar (Xfce).
  2. 2 Double-click the file.
  3. 3 Or choose another program by right-clicking the file -> Open With -> a suitable app.
  4. 4 Install a suitable app (if it is not installed on your computer) from the software centre, repository or Flathub.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Linux

Open a .DAT file on Android

  1. 1 Launch Files or another file management app.
  2. 2 In Downloads, find the .DAT file and open it by tapping.
  3. 3 A list of apps capable of opening the file will be shown. Tap a suitable app and press Always to permanently connect the file type with this app.
  4. 4 No apps able to open this file? Download a suitable app from the Google Play Store.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Android

Open a .DAT file on iPhone / iPad

  1. 1 Use the Files app and go to On My iPhone, iCloud Drive or Downloads.
  2. 2 Tap the .DAT file you want to open.
  3. 3 If the file can be opened by a built-in iOS app (supported format), it opens automatically.
  4. 4 Touch and hold the file to get the context menu -> choose Share -> select a suitable app from the list of apps.
  5. 5 If there is no such option, download the app first from the App Store and then tap the document again.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for iPhone / iPad

Open a .DAT file online

  1. 1 Move to the online viewer at the top of this page.
  2. 2 Drag the file there or select it, and its contents will appear in your browser tab. The file is not uploaded.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Online

More details about opening .DAT files

Windows users should verify the origin of the .dat file prior to using it. When stored in the vicinity of program files, chances are the said program will open the file properly. Notepad++ or Visual Studio Code should handle any text and/or CSV .dat, while VLC can open VCD video tracks (.dat, MPEG 1). FFmpeg is necessary for remuxing those, while Winmail.dat can be opened via Outlook combined with a TNEF decoder like tnef. For any type of regf registry hive file including NTUSER, use the Registry Explorer, not editor.

The same applies when working on macOS: VLC opens video .DAT (VCD track) while TNEF's Enough utility extracts Winmail.dat attachments; Minecraft level.dat can be edited on MacOS with the help of NBTExplorer app. To open the .dat unknown media and text content, one needs to use Visual Studio Code or TextEdit application depending on which one is preferred.

To open .dat files on Linux OS, users will have to determine the nature of the said .dat using the built-in 'file' tool and then either utilize VLC for videos or NBTexplorer / PyNBT libraries to work with Minecraft, as well as SQLite3 database viewer for .dat databases.

On the whole neither the Android phone nor iPhone has decent general approach for all types of dat - the only apps worth trying here are VLC for recognizable media, as well as Outlook application to get Winmail.dat mail contexts and other related information - cloud file viewers usually cannot recognize dat.

On a PC, browsers also offer virtually no tools whatsoever - some text files might appear as text, and some media files may play after MIME detection.

As for renaming the file when it opens wrong application when double-clicked - don't rush: first find out what sort of dat file it is using hex editor or the file command, pick an app and proceed. Most types of game archives require modding software for that matter. Wallet.dat and NTUSER.DAT should always be dealt with in copies as Bitcoin will lock or rewrite original.

Technical details

Generic .dat files have no required header, MIME type, encoding, byte order, compression method, or fixed record format. The .dat file extension can refer to plain text, binary, or archive formats where only way to distinguish is via creating application, surrounding files or analysis process. Application/octet-stream is default MIME type of this format and it says nothing about the file structure itself.

Some .dat files have fixed signatures of their type. The Video CD .DAT files contain the MPEG-1 program stream data in CD-ROM XA Mode 2 Form 2 sectors where the dumped sectors usually begin with 12-byte synchronization pattern 00 FF FF FF FF FF FF FF FF FF FF 00. Microsoft TNEF Winmail.dat files start with 78 9F 3E 22 and store a sequence of typed attributes like the message body, filenames, attachment data, RTF data, and MAPI properties. The first two bytes of Minecraft level.dat file are usually 1F 8B indicating gzip compression while after decompression it contains NBT tags, namely named big-endian numeric types, tags-compounds, lists.

Other .dat files are just renamed databases. Bitcoin wallet.dat has Berkeley DB structure, commonly using B-trees or hashing schemes with DB magic signature located at offset 12 of the file that has records of keys, encrypted keys, labels, transactions or wallet metadata. SQLite databases in .dat format start with the 16-byte SQLite format 3\0 header, include a page size in the header, and use B-tree pages, freelist pages, and the schema table, optionally with WAL or journal sidecars. Windows registry file structure includes ASCII regf at beginning, and it uses aligned bins (4 KiB), cells, key nodes, value nodes, and security descriptors, and may be accompanied with .LOG1 and .LOG2 transaction logs. Internet Explorer index.dat files have structure with Client UrlCache MMF header with URLs and fixed type records like URL, HASH, REDR and LEAK records.

File size may differ starting with just few bytes of settings .dat files, to a few KBs when we talk about Winmail.dat without attachments, up to megabytes occupied for Minecraft map world, SQLite files, to few hundred megabytes taken for complete movie on VCD.

How to convert .DAT files

The best way of converting DAT videos using FFmpeg would be remux to MPEG program stream: ffmpeg -i input.dat -c copy output.mpg; otherwise, in case your VCD .DAT file is not just a container, it can be transcoded using FFmpeg to an appropriate MP4 format (ffmpeg -i input.dat -c:v libx264 -c:a aac output.mp4). Though such conversion involves another encoding cycle of MPEG video and therefore losing all original compression.

In terms of Winmail.dat conversion, the task will be to extract files. You can use either tnef --directory output input.dat or Enough in TNEF package. Note, you cannot simply convert WinMail.dat message to one simple document as it stores several documents and other properties in one structure.

When it comes to converting SQLite dat files, running sqlite3 input.dat .dump > output.sql preserves all your tables, their schemas, and rows of data which can later be used both for backup purposes or migrating data between databases in SQLite. sqlite3 -header -csv input.dat "SELECT * FROM table_name;" > output.csv will dump only rows of table from database without any metadata and other properties like indexes and types.

In case your DAT file contains ASCII tables, first thing that needs to be done is checking the delimiters usage and encoding inside your file before exporting to the corresponding format (CSV or Tab-separated file) with proper quotes of comma symbols, line separators usage, and code-page preservation (UTF-8 or the original code page).

Convert toToolCommand / note
MP4 video FFmpeg ffmpeg -i input.dat -c:v libx264 -c:a aac output.mp4 Use for Video CD .DAT files; MPEG-1 video is re-encoded unless you choose stream copy to an MPEG container.
MPEG program stream FFmpeg ffmpeg -i input.dat -c copy output.mpg Best lossless remux for VCD .DAT when the file is a valid MPEG-1 system stream.
Extracted email attachments tnef tnef --directory output input.dat Use for Winmail.dat/TNEF; it extracts embedded files, RTF body and MAPI attributes rather than producing one universal output file.
NBT SNBT text Minecraft data tools / NBTExplorer NBTExplorer can edit and save Minecraft level.dat; command-line conversion depends on the chosen NBT library because Mojang has no official CLI converter.
SQLite SQL dump sqlite3 sqlite3 input.dat .dump > output.sql Only works when the .dat file is actually an SQLite database with the SQLite header.
CSV tables sqlite3 sqlite3 -header -csv input.dat "SELECT * FROM table_name;" > output.csv Replace table_name with a real table; indexes, constraints and data types are not preserved in CSV.
Registry hive report Registry Explorer Open NTUSER.DAT or another hive and export keys/values to common report formats; live user hives may require a copy or shadow copy.
Plain text / CSV Visual Studio Code or Notepad++ Only appropriate for .dat files that are already text or delimited records; binary files will appear as unreadable characters.

Common problems and fixes

The “Windows can’t open this file” message means, probably, the lack of association between the .DAT extension and some program rather than an inherent senselessness of that data. Before establishing any default associations for the extension, it is necessary to find out what source created the specific .dat file, where it is situated on your computer, and which hexadecimal values precede the file itself by using a corresponding software application.

The error produced during a try to watch such videos in VLC media player or via FFmpeg as “Invalid data found when processing input” usually denotes the incorrectness or incompleteness of the video file (.DAT), its being not VCD MPEG-1, the disc copy dropped sector data, or the file was truncated. In the valid VCD file (.dat), the first twelve hexadecimal numbers ought to be: 00 FF FF FF FF FF FF FF FF FF FF 00.

Winmail.dat seems to appear whenever someone tried to receive an attachment but, in vain because that attachment turned into the winmail. It is recommended to use tnef or 'TNEF's Enough' programs or ask a correspondent to disable Microsoft outlook rich text format in favour of HTML format or the ordinary plain format in order to get rid of winmail.dat.

The Bitcoin Core's warning “wallet.dat corrupt, salvage failed” should warn you about stopping the running node, doing the backup for the corrupted wallet.dat, checking disk health and only then applying for recovery tools and never trying to fix Bitcoin wallet's dat file manually. SQLite errors such as “file is encrypted or is not a database” mean that there is no SQLite here, or the file uses some kind of encryption or has been copied after writing operations but without WAL part.

The error, “The process cannot access the file” will take place when it tries to load NTUSER.DAT registry when NTUSER.DAT is live and locked. Just copy NTUSER.DAT from somewhere else.

Security considerations

.dat files are usually passive data files, but risks come from the executable program running them. File parsers of media data, archives, databases, and even game files suffer memory safety vulnerabilities. In Winmail.dat case, there’s a special concern due to possibility of TNEF format storing any kind of attachment, including .exe files, as well as scripts, and dangerous Office macros. Thus, it’s recommended to scan extracted content before opening it. Wallet file is quite dangerous, since it may hold private keys or encrypted key material. So, be careful about not uploading it to online parsers without fully understanding possible risks. User configuration file NTUSER.DAT can show configuration preferences, recently viewed files, and even authentication token. Also, history files like Index.dat (which was used for IE) can still expose your history data with exact dates and URLs. In-game .dat files can lead to crashes in client applications as well as can trigger bugs in modded parsers. Text-based .dat files can have personal or security information.

History and versions

Extension .DAT came from the DOS and old application file formats where any three-character suffix indicated an approximate usage of files while there was no definite file structure for all such files. Moreover, it never acquired status of any official file type specification format and is being treated that way till nowadays.

One may observe some famous examples of how .dat extension is used in different formats created later than the appearance of DOS: Video CD technology specified by Philips corporation, Sony corporation, Matsushita, and JVC in the first half of 1990s; Video CD 2.0 came up in 1995, storing MPEGAV movie tracks as DAT files; Microsoft TNEF comes directly from Microsoft Mail and Microsoft Exchange and its implementation details were publicly documented in MS-OXTNEF Open Specifications; NTUSER.DAT comes from NT Registry of Windows NT version 3.X released in 1993; internet explorer index.dat appeared at the age of IE versions 4 to 9 and was widely used for storing browser's cache files and browser history files.

Examples for more recent usage of .dat extension are NBT (named binary tag) format level.dat used in Minecraft circa 2009; Satoshi client wallet (wallet.dat) introduced together with Bitcoin Core circa 2009; and SQLite 3 database which has been available since 2004 (and many implementations store databases in DAT files using default format).

Also other .dat extensions are usually replacements for something much more readable. Similarly, ".bin" extension is less clear, too, and used typically for firmware images, raw disk dumps, or CD-images, not for program settings data. In databases .db, .sqlite and .sqlite3 provide much better hints; when it is necessary to determine whether a particular database was created with the aid of SQLite, there is no strict necessity in renaming file to any of these extensions. As for texts tables, .csv and .tsv extensions will fit here because of their explicit character.

There is nothing difficult in determining specialized ecosystems. VCD movie .DAT files, which were created from an MPEG-compliant VCD movie disc, may easily be remuxed to ".mpg" format without re-encoding process; while .winmail.dat represents TNEF encoding container. Email messages have clear and understandable ".msg" or ".eml" files. Level.dat stores World info of Minecraft; .mca holds region chunks of this game; moreover, NBT, Schematic may also present here. In addition, Windows registry hive .dat files include NTUSER.DAT and these files serve as the binary live databases, opposite .reg text-based export. And, Bitcoin wallets wallet.dat use Berkeley DB semantics (wallet file).

Comments (0)

Replying to

No comments yet. Be the first to share your experience with this file type.