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.
- Open Colab — Go to colab.research.google.com, sign in with any Google account, and click New Notebook.
- Upload your file — Click the folder icon in the left sidebar, then the upload button, and select your .dta file.
- 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)
- 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 situation | Use this |
|---|---|
| No software installs, one file, data not confidential | Google Colab |
| Confidential data | jamovi or JASP — the file never leaves your computer |
| You need to run stats after converting | jamovi or JASP |
| Many files, or a task you’ll repeat | Python or R script |