XPT to CSV
Open a SAS transport file as CSV or as an Excel workbook. Useful for checking a submission dataset, or for anyone who received an .xpt and has no SAS.
How it works
- Drop your file in the box above, or click it to pick one.
- Pick the output format and press Convert.
- Download the result. Nothing was uploaded on the way.
Is it safe?
Clinical datasets, even pseudonymised ones, aren't something to email to a free web service. The .xpt is read entirely by the browser on this computer, with no copy sent out.
Want to check? Open your browser DevTools, switch to the Network tab and convert a file. Or convert a small file once, because each converter downloads its code the first time, then go offline and convert your real file.
The format regulators ask for
XPT, or SAS XPORT, is SAS's transport format: a plain, openly documented layout meant for moving datasets between systems. That openness is why the US FDA asks for study data in version 5 transport files. Sponsors and CROs ship SDTM domains (dm.xpt, ae.xpt, lb.xpt) and ADaM datasets (adsl.xpt) this way, and public data such as the CDC's NHANES survey is published as .xpt too.
So an .xpt ends up with data managers, medical writers, statisticians on R, and students working through NHANES. The converter reads version 5 and version 8 transport files.
What comes out
CSV output gives three files: the data, a variables file and a value labels file. In a version 5 file variable names are at most 8 characters, so the label column of the variables file is where "Analysis Visit" hides behind AVISIT. Excel output puts the same three tables on Data, Variables and Value labels sheets.
The value labels file stays empty apart from its header. Like every SAS dataset, an .xpt keeps codes as plain values and leaves the labels to formats stored elsewhere. In SDTM and ADaM work the meaning of each code is written down in the define.xml and the controlled terminology, which aren't read here.
Dates, missing values, size
Date variables with a SAS date format (DATE9., E8601DA. and similar) become 2024-03-01 with "Readable dates". In SDTM most dates are ISO 8601 text already (--DTC variables), and those pass through untouched. Numeric missing values are empty cells; set Missing values to "Keep the stored code" if the special ones (.A to .Z) mean something in your data.
Transport files are uncompressed and so bigger than the same data elsewhere. Up to 200 MB is accepted on a computer, less on phones. Excel output stops at around 3 million data cells; CSV doesn't.
Questions about this format
How do I open an XPT file without SAS?
Convert it here to CSV or Excel and open that. In code, R (haven::read_xpt) and Python (pandas.read_sas) read .xpt directly.
Can I open NHANES .xpt files in Excel?
Yes. Pick Excel XLSX as the output and open the workbook. The Variables sheet carries the labels that explain short NHANES names like RIDAGEYR.
Does this check FDA submission compliance?
No. It reads and converts the data; it doesn't validate against SDTM, ADaM or the FDA's technical rules. Use a dedicated validator for that.
Is XPT the same as SAS7BDAT?
Both hold SAS datasets. SAS7BDAT is the native working format; XPT is the transport format for exchange and archiving. Both convert here, each on its own page.
Last updated: