.DTA

DTA File

Stata Data File
Ask a question
QUICK ANSWER

A DTA file is almost always a Stata dataset - the native binary format of the StataCorp Stata statistics package. You do not need a paid Stata licence to open one: PondPilot opens it free in the browser, and R's haven package or Python's pandas can read it directly. Converting to CSV or Excel is straightforward with those same tools.

Developer: StataCorp LLC (Stata format); otherwise N/A (generic) Category: Data Files Open standard MIME: application/x-stata-dta
OPENS ON Windows macOS Linux Web
Related: .PKPASS · .DAT · .JSON · .RIS

On this page

19k+ extensions indexed
Last reviewed Aug 17, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the DTA file format?

Files with the .dta extension are most commonly Stata Data Files - the native dataset format created by StataCorp LLC - though .dta is also used as a generic extension by a handful of other applications for storing data. A .dta file can contain various types of statistical information, depending on the application that produced it.

The Stata .dta format dates back to Stata 1.0 (1985), with internal format versions 104-121 mapping to Stata releases 8 through 19. Data stored in .dta files is saved in a structured binary format. Modern files (format 117 and later, produced by Stata 13+) use an XML-tagged binary layout and begin with the literal ASCII signature <stata_dta> at byte zero, making them straightforward to identify. Older files (formats 104-115) carry no ASCII signature - the first byte encodes only the numeric format-version identifier.

Each .dta dataset holds a rectangular table of variables (columns) and observations (rows). Every variable carries a name, storage type, display format, and an optional label, and the file may also include dataset-level metadata such as a timestamp, sort-variable list, value-label dictionaries, and user-defined characteristics. Supported numeric types include byte, int, long, float, and double; string types range from fixed-width str1-str2045 to the variable-length strL (up to ~2 billion characters, available in format 117+).

Beyond Stata itself, .dta files are broadly interoperable and can be opened or converted using free tools:

  • R via the haven package (also imports .sav and .sas7bdat)
  • Python via pyreadstat or pandas with stata_reader
  • PSPP, the open-source SPSS alternative
  • Export to CSV or .RData is straightforward from any of these tools

Security & safety

RISK: LOW

A Stata .dta is passive data - it contains no executable code, so opening one in a viewer is safe. The realistic cautions are non-malware: datasets can carry confidential/personal data (anonymise before sharing), and value/variable labels are easy to lose when exporting to CSV. Browser viewers like PondPilot process the file locally, but verify that before uploading sensitive research data anywhere. Beware fake "DTA viewer/repair" download sites that bundle adware - prefer the free readers listed here.

Format details

in a nutshell
FULL NAMEStata Data File
DEVELOPERStataCorp LLC (Stata format); otherwise N/A (generic)since Stata .dta since Stata 1.0 (1985); format versions 104-121 map to Stata 8-19
CATEGORYData Files
MIME TYPEapplication/x-stata-dta
TYPEProprietary binary statistical dataset (Stata); varies for other apps
STANDARDOpen · royalty-free
This extension is also used by…
  • Turbo Pascal data table - Borland Turbo Pascal stored data tables as .dta, readable only by that legacy environment.
  • Generic game / application data - Some games and apps use .dta as a plain 'data' suffix for their own files, opened only by the originating program.

Programs that open DTA files

Windows4 apps
Stata Paid The native app. File > Open the .dta, or just double-click; full editing and analysis.
R + haven (RStudio) Open-source read_dta('file.dta') loads the dataset with labels into a data frame - free.
Python + pandas Open-source pandas.read_stata('file.dta') reads the dataset; export with .to_csv() / .to_excel().
PSPP Open-source Free SPSS-like stats program; import the Stata .dta to view and analyse it.
macOS2 apps
Stata Paid Native Mac build; File > Open the .dta.
R + haven / Python + pandas Open-source Same free readers as on Windows - read_dta() (R) or pandas.read_stata() (Python).
Linux1 app
R + haven / Python + pandas / PSPP Open-source Free readers all run on Linux; or 'python -c "import pandas;pandas.read_stata(...)"'.
Web1 app
PondPilot Free Open the .dta in the browser - reads Stata 8-19, keeps labels, exports CSV/Parquet/JSON/Excel; data stays local.

Technical details

deep spec
Format typeProprietary binary statistical dataset
Primary developerStataCorp LLC
Internal format versions104-121, corresponding to Stata releases 8 through 19
Magic signatureASCII text "<stata_dta>" at byte offset 0 (format 117+, Stata 13 and later); no ASCII signature in older formats 104-115
MIME typeapplication/x-stata-dta
Character encodingUTF-8 in format 118+ (Stata 14+); ASCII in earlier versions
Data layoutRectangular: one row per observation, one column per variable
Supported storage typesbyte, int, long, float, double; str# fixed-width strings up to str2045; strL variable-length strings (format 117+)
Variable metadataName, storage type, display format, variable label, and value-label dictionary name stored per variable
Dataset metadataTimestamp, sort-variable list, value-label dictionaries, and user-defined key-value characteristics
EndiannessLittle-endian in format 117+; earlier versions supported both little-endian and big-endian byte orders
CompressionUncompressed by default; optional zlib compression introduced in format 121 (Stata 18)
Maximum variables2,047 (Stata/IC); 32,767 (Stata/SE); 120,000 (Stata/MP)
InteroperabilityReadable by R (haven package), Python (pyreadstat / pandas), PSPP, and SAS (PROC IMPORT)
Cross-platform availabilityWindows, macOS, and Linux; format 117+ files are byte-order-portable across all platforms
ReleasedStata .dta since Stata 1.0 (1985); format versions 104-121 map to Stata 8-19
Open standardYes · royalty-free
Specificationwww.stata.com

DTA conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with DTA files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about DTA files.

Frequently asked questions

How do I open a DTA (Stata) file without Stata?
Use the free PondPilot web viewer (opens Stata 8-19 in the browser and exports CSV/Excel), or read it in R with haven::read_dta() or in Python with pandas.read_stata(). GNU PSPP can also import it.
How do I convert a Stata .dta to CSV or Excel?
In Stata: 'export delimited' (CSV) or 'export excel' (XLSX). Without Stata: PondPilot exports both from the browser, or use pandas/R haven to read then write the file.
Why won't my old Stata open this .dta?
It was saved by a newer Stata version. Ask the sender to re-save it with 'saveold' to your version, or read it in R/Python/PondPilot, which handle all recent formats.
Is every .dta a Stata file?
No. Stata is by far the most common meaning, but .dta is also reused as a generic 'data' suffix by a few unrelated programs. If a Stata reader rejects the file, identify it by its source folder or with TrID and open it in the program that made it.
Do I lose my labels when exporting to CSV?
Often yes - CSV has no concept of value labels, so categorical columns export as the underlying numeric codes. Apply the value labels (decode in Stata, or map in R/pandas) before exporting if you need the text.
Can R and Python really read Stata files for free?
Yes. R's haven::read_dta() and Python's pandas.read_stata() read Stata datasets including variable and value labels, with no Stata licence required.

References

1StataCorp - .dta file format specificationwww.stata.com
2StataCorp - Opening and saving Stata datasetswww.stata.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.MDMarkdown Document
3.CRDOWNLOADChrome Partial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.PARTPartial Download File
6.NOMEDIAAndroid No-Media Marker File
7.RPMSGRestricted Permission Message
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.ICSiCalendar data file

Related extensions

.PKPASSApple Wallet Pass (formerly Passbook)
.DATProgram Data File (generic)
.JSONJavaScript Object Notation file
.RISResearch Information Systems citation file
.OFXOpen Financial Exchange
.CSVComma-Separated Values

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z