What is a .fits file?
Flexible Image Transport System · Data · NASA / IAU · 1981
FITS is the standard file format of astronomy. It stores telescope images and data tables together with a human-readable text header of metadata, and it has been used for space data for over forty years.
What is a .fits file used for?
A FITS file begins with an ASCII header, the first keyword being SIMPLE, that describes the data: dimensions, coordinates, instrument and observation details. The header is followed by the binary image or table data.
Its longevity is a design goal: FITS files from decades ago still read today. Astronomers open them in tools like SAOImageDS9, or in Python with Astropy.
What opens a .fits file?
The .fits format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.
Windows
- SAOImageDS9
- Python (astropy)
- FITS Liberator
macOS
- SAOImageDS9
- Python (astropy)
Linux
- SAOImageDS9
- Python (astropy)
- ds9
Open a .fits file step by step
- Confirm the file really is a .fits. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
- On Windows, open it with SAOImageDS9 or Python (astropy).
- On Mac, use SAOImageDS9 or Python (astropy).
- On Linux, try SAOImageDS9 or Python (astropy).
- Still stuck? Convert the .fits to png, which opens more widely.
Why can't I open my .fits file?
Almost always because no installed app understands FITS. 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 .fits 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 .fits file
You can convert a .fits file to png, tiff, csv using a conversion tool or the export menu of an app that opens it.
What is the .fits file signature (magic bytes)?
A .fits file starts with the hex bytes 53 49 4D 50 4C 45, which read as SIMPLE in ASCII. Programs identify FITS by those bytes, not by the filename, so a renamed file still gives itself away.
These are the documented signatures for FITS. For a full breakdown, see the FITS (astronomy) file signature page.
| Hex signature | Offset | ASCII | Note |
|---|---|---|---|
| 53 49 4D 50 4C 45 | 0 | SIMPLE | 'SIMPLE' header keyword |
See the full magic-numbers reference for every format.
Frequently asked questions
What is a .fits file?
FITS is the standard file format of astronomy. It stores telescope images and data tables together with a human-readable text header of metadata, and it has been used for space data for over forty years.
How do I open a FITS file?
Astronomers use SAOImageDS9 to view the images, or read them in Python with the Astropy library. General image viewers usually cannot open FITS.
What is a FITS file used for?
Storing astronomical images and data tables from telescopes and space missions, along with a rich metadata header describing each observation.
Why is FITS still used after 40 years?
Backward compatibility is a core principle: old FITS files must keep working. That stability is priceless for archives of irreplaceable astronomical data.
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.