How to open .FITS files on Windows

To open .FITS files on Windows, install and open SAOImage DS9 (a common FITS viewer), then use File → Open to load the .FITS file.

Step-by-step instructions

  1. Install and open SAOImage DS9 (a common FITS viewer), then use File → Open to load the .FITS file.
  2. If you use Python, install Astropy and open the file with astropy.io.fits (e.g., load HDUs and inspect headers/data).
  3. If the file still won’t open, verify it is a real FITS file (not mislabeled) and try another FITS-capable tool on a desktop OS.

Alternative methods

  • Open .FITS in a browser-based viewer if desktop apps fail.
  • Try opening .FITS on Windows with a secondary app to rule out app-specific issues.
  • Convert .FITS only with trusted tools when direct opening is not possible.

Common issues

The file won’t open in my normal photo viewer

FITS is a scientific data format and is not broadly supported by consumer image apps, even though it can store images.

  1. Open it with a FITS-capable viewer such as SAOImage DS9.
  2. If you need to process the data, use Python with astropy.io.fits to read the HDUs and extract the image array.

Opens, but looks black/blank or the contrast is wrong

Astronomical FITS images often contain high dynamic range data, non-8-bit pixel types, or values that require scaling/stretching to display properly.

  1. In a FITS viewer (e.g., DS9), adjust the display scale/stretch (common for astronomical images).
  2. Check the header keywords and data type by reading the file with astropy.io.fits to understand scaling and value ranges.

Error reading FITS: corrupted/truncated file or invalid header

FITS readers expect a strict structure (HDU headers and data blocks). Interrupted downloads or partial transfers can break that structure.

  1. Re-download or re-copy the file from the original source and compare file sizes if possible.
  2. Try opening with another FITS reader/library; many tools rely on CFITSIO, which may provide clearer error messages.
  3. If you have access to the producer software/instrument pipeline, regenerate or re-export the FITS file.

The FITS file has multiple extensions and I can’t find the image/table I need

A single FITS file can contain multiple HDUs (primary HDU plus extensions like images or tables). Some viewers open only the first HDU by default.

  1. In DS9, browse/select different extensions (HDU list) to view the desired image/plane.
  2. In Python, use astropy.io.fits to list HDUs and select the correct extension by index or name.

Security note

FITS files are data files (headers + data blocks) and do not typically contain active content like macros, but they can still be risky if opened with vulnerable parsers—use well-maintained tools and libraries (e.g., established FITS viewers and Astropy/CFITSIO-based readers).

Back to .FITS extension page