CSV Tools

Convert DTA to CSV

Convert Stata (.dta) files to CSV — free methods that work without Stata

Need a different conversion? Browse all of our CSV converters. Want a test file first? Download a free sample Stata file.

A .dta file is a dataset saved by Stata, the statistics package — and Stata licenses are priced well beyond “I just need to open one file” territory. There is no in-browser .dta converter on this site yet, but the free workaround is unusually easy for this format: the fastest no-install option is Google Colab (below), and if you already use Python or R, jump to those sections.

No installation: Google Colab (works on any computer)

Google Colab runs Python in your browser for free — no installation, works on a Chromebook or a locked-down library computer. Of all the formats covered in these guides, .dta is the simplest: pandas reads it out of the box, so there is nothing to install even inside Colab.

  1. Open Colab — Go to colab.research.google.com, sign in with any Google account, and click New Notebook.
  2. Upload your file — Click the folder icon in the left sidebar, then the upload button, and select your .dta file.
  3. Run the code — Paste this code into the cell and press the run button:
import pandas as pd
df = pd.read_stata("survey.dta")  # replace survey.dta with your file's name
df.to_csv("output.csv", index=False)
  1. Download the result — Refresh the file sidebar, right-click output.csv, and choose Download.

Your uploaded file lives in a temporary private session that disappears when the tab closes — but it is processed on Google’s servers, so for confidential data prefer a desktop app below, which never sends your file anywhere.

Free desktop apps (no code)

  • jamovi — the primary pick: a free statistics app that imports Stata .dta files (labels included) and exports CSV via File → Export. Runs on Windows, macOS, and Linux, and gives you a spreadsheet-style view of the data if you just want to look at it.
  • JASP — free alternative with the same flow: open the .dta file, then export the data as CSV.
  • One warning: GNU PSPP does not read .dta files. It is the free counterpart to SPSS, not Stata — an easy wrong guess if you have both formats on your desk.

Python

pandas reads Stata files with no extra dependency:

import pandas as pd
df = pd.read_stata("survey.dta")  # replace survey.dta with your file's name
df.to_csv("output.csv", index=False)

Version coverage: pandas supports dta format versions 105 through 119 — files saved by Stata 8 all the way through current releases, since Stata 18 still writes format 118 by default. If pandas rejects an unusually old or exotic file, try pyreadstat.read_dta as a fallback.

Labeled columns behave like the SPSS case: read_stata converts codes to their value labels by default, so your CSV says Male rather than 1. Pass convert_categoricals=False if you need the raw codes.

R

install.packages(c("haven", "readr"))
library(haven)
df <- read_dta("survey.dta")  # replace survey.dta with your file's name
readr::write_csv(df, "output.csv")

This writes the underlying numeric codes for labeled columns. To write the labels instead, convert first: df <- as_factor(df).

Which method should I use?

Your situationUse this
No software installs, one file, data not confidentialGoogle Colab
Confidential datajamovi or JASP — the file never leaves your computer
You need to run stats after convertingjamovi or JASP
Many files, or a task you’ll repeatPython or R script

FAQ

5 questions
Can I open a .dta file without Stata?
Yes. The Google Colab method on this page needs nothing but a browser and a Google account, and jamovi and JASP are free desktop apps that import .dta files directly. None of them require a Stata license.
Can Excel open .dta files?
No. Excel cannot read the Stata .dta format directly. Convert the file to CSV first using any method on this page, then open the CSV in Excel.
Do value labels survive the conversion?
Yes, by default. pandas.read_stata converts labeled columns to their labels (so your CSV says Male, not 1), and jamovi and JASP import labels too. If you want the raw numeric codes instead, pass convert_categoricals=False to read_stata.
Which Stata versions' .dta files work?
pandas reads dta format versions 105 through 119, which covers files saved by Stata 8 through the current releases — Stata 18 still saves format 118 by default. For very old or unusual files that pandas rejects, the pyreadstat library is a good fallback.
Where can I get a .dta file to test with?
This site hosts a free sample Stata file with an employee dataset at csvtools.com/sample-data/stata/ — download it and try any method on this page before running your real file through.

More Format Guides & Converters

6 pages

More Convert File Formats Tools

23 tools