Convert SAV to CSV

How to export SPSS data sets in CSV format.

Convert sav to csv

How to convert sav to csv file

What are .sav files?

A .sav file is most commonly associated with SPSS (Statistical Package for the Social Sciences), containing data and metadata (e.g., variable labels, value labels). Converting an SPSS .sav file to a more universally readable format like CSV typically involves using SPSS, an open-source tool like PSPP, or a programming language library (e.g., Python or R).

Using SPSS

  1. Open the .sav file in SPSS:

    • Launch SPSS
    • Go to FileOpenData…
    • Select your .sav file
  2. Export to CSV:

    • Go to FileSave As…
    • In Save as type, select Comma delimited (.csv)
    • Choose a destination folder and filename, then Save

SPSS will remove some metadata (like labels) when saving to CSV because CSV is a plain-text format.

Using PSPP (free/open-source)

PSPP is a free alternative to SPSS that can read and save .sav files.

  1. Open PSPP and import the .sav file: Go to FileOpen… and select the .sav file

  2. Export to CSV:

    • Go to FileSave As…
    • Select Comma Separated Values (.csv) under File type
    • Click Save

PSPP will export the data similarly but without some of the specialized SPSS metadata.

Using R (with the haven package)

If you have R installed, you can use the haven package to read .sav files and write them out as CSV.

  1. Install haven (if not installed):
    install.packages("haven")

  2. Load your .sav file and export to CSV:
    library(haven) 
    # Read the .sav file
    df <- read_sav("path/to/yourfile.sav")
    # Write the data frame to CSV
    write.csv(df, "output.csv", row.names = FALSE)

Using Python (with the pyreadstat Library)

In Python, you can use the pyreadstat library to read .sav files, convert them to a pandas DataFrame, and save them as CSV.

  1. Install pyreadstat (if not installed): pip install pyreadstat
  2. Read .sav file and convert:
    import pyreadstat
    # Read the .sav file
    df, meta = pyreadstat.read_sav("path/to/yourfile.sav")
    # Export to CSV
    df.to_csv("output.csv", index=False)

 

Each method will produce a CSV file containing your data in plain-text format. Certain SPSS-specific features (labels, formats) will not fully carry over to CSV, as CSV does not support these metadata fields.

Video: Convert SAV to CSV on YouTube

Additional formats for
sav file conversion

Share on social media: