What is a .sas7bdat file?
SAS Data Set File · Data · SAS Institute · 1990s (SAS 7)
A .sas7bdat file is a SAS dataset, the table format of the SAS analytics system that dominates clinical trials, banking and insurance. The name means SAS version 7 binary data.
What is a .sas7bdat file used for?
SAS is entrenched in regulated industries, pharma submissions above all, so .sas7bdat files are everywhere data leaves a SAS shop. The format is proprietary: it starts with a long fixed binary header that identifies it, but SAS has never published the specification, and open-source readers are built on reverse engineering.
Those readers are mature: pandas, R's haven, and readstat handle typical datasets well. Compressed or encrypted SAS files are the cases where only SAS itself is reliable.
What opens a .sas7bdat file?
The .sas7bdat format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.
Windows
- SAS
- Python (pandas.read_sas)
- R (haven)
- SAS Universal Viewer
macOS
- Python (pandas)
- R (haven)
Linux
- Python (pandas)
- R (haven)
Open a .sas7bdat file step by step
- Confirm the file really is a .sas7bdat. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
- On Windows, open it with SAS or Python (pandas.read_sas).
- On Mac, use Python (pandas) or R (haven).
- On Linux, try Python (pandas) or R (haven).
- Still stuck? Convert the .sas7bdat to csv, which opens more widely.
Why can't I open my .sas7bdat file?
Almost always because no installed app understands SAS Dataset. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.
The other possibility is that the file is not really a .sas7bdat at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.
How to convert a .sas7bdat file
You can convert a .sas7bdat file to csv, parquet, xlsx using a conversion tool or the export menu of an app that opens it.
SAS Dataset has no fixed magic number, so there is no signature table on this page. Its bytes alone do not prove the format: identification relies on the extension, the structure of the content and the program that created it. The magic-numbers reference lists the formats that do carry one.
Frequently asked questions
What is a .sas7bdat file?
A .sas7bdat file is a SAS dataset, the table format of the SAS analytics system that dominates clinical trials, banking and insurance. The name means SAS version 7 binary data.
How do I open a .sas7bdat file without SAS?
pandas.read_sas() in Python or haven::read_sas() in R open most files free of charge. SAS also offers the no-cost SAS Universal Viewer on Windows for looking without converting.
Why is my .sas7bdat file unreadable outside SAS?
It is probably compressed (BINARY/CHAR compression) or encrypted, options the reverse-engineered readers only partly support. Export from SAS to CSV or XPT in that case.
What is the difference between .sas7bdat and .xpt?
.sas7bdat is SAS's native dataset; .xpt is the open SAS Transport format required by regulators like the FDA precisely because its layout is publicly documented.
Related formats
Sources
Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.