What is a .rds file?
R Serialized Data File · Data · R Core Team · 2000 (R 1.0)
An .rds file stores a single R object, saved with saveRDS() in the R statistics language. Its siblings .RData and .rda hold whole collections of objects saved with save(). All are R's native serialization.
What is a .rds file used for?
R analysts save models, data frames and results this way because everything survives exactly: types, factors, attributes. An .rds file holds one object you assign on load; .RData restores objects under their original names into your session.
The files are normally gzip-compressed R serialization, so there is no single fixed signature to look for. Only R (or rpy2/pyreadr bridges) reads them, which is why sharing data outside R usually means exporting CSV or parquet instead.
What opens a .rds file?
The .rds format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.
Windows
- R / RStudio
- Python (pyreadr)
macOS
- R / RStudio
- Python (pyreadr)
Linux
- R / RStudio
- Python (pyreadr)
Open a .rds file step by step
- Confirm the file really is a .rds. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
- On Windows, open it with R / RStudio or Python (pyreadr).
- On Mac, use R / RStudio or Python (pyreadr).
- On Linux, try R / RStudio or Python (pyreadr).
- Still stuck? Convert the .rds to csv, which opens more widely.
Why can't I open my .rds file?
Almost always because no installed app understands RDS. 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 .rds 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 .rds file
You can convert a .rds file to csv, parquet, xlsx using a conversion tool or the export menu of an app that opens it.
RDS 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 .rds file?
An .rds file stores a single R object, saved with saveRDS() in the R statistics language. Its siblings .RData and .rda hold whole collections of objects saved with save(). All are R's native serialization.
How do I open an .rds file?
In R: x <- readRDS("file.rds"). In Python, the pyreadr package reads both .rds and .RData without an R installation.
What is the difference between .rds and .RData?
.rds (saveRDS) stores one object without its name, so you assign it on load. .RData/.rda (save) stores several named objects that load straight into your environment.
How do I convert .rds to CSV?
Load it in R with readRDS() and write it out with write.csv() or readr::write_csv(). For big tables, arrow::write_parquet() keeps types better.
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.