---
name: "fitsheader"
section: "1"
platform: "linux"
package: "astropy-utils"
version: "7.0.1-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/fitsheader"
---

# fitsheader(1)

Print the header(s) of a FITS file.

## NAME

fitsheader - Print the header(s) of a FITS file.

## DESCRIPTION

usage: fitsheader \[-h\] \[-e HDU\] \[-k KEYWORD\] \[-t \[FORMAT\]\] \[-c\]

-

  filename \[filename ...\]

Print the header(s) of a FITS file. Optional arguments allow the desired extension(s), keyword(s), and output format to be specified. Note that in the case of a compressed image, the decompressed header is shown by default.

### positional arguments:

- filename

  path to one or more files; wildcards are supported

### optional arguments:

- **-h**, **--help**

  show this help message and exit

- **-e** HDU, **--extension** HDU

  specify the extension by name or number; this argument can be repeated to select multiple extensions

- **-k** KEYWORD, **--keyword** KEYWORD

  specify a keyword; this argument can be repeated to select multiple keywords; also supports wildcards

- **-t** \[FORMAT\], **--table** \[FORMAT\]

  print the header(s) in machine-readable table format; the default format is "ascii.fixed\_width" (can be "ascii.csv", "ascii.html", "ascii.latex", "fits", etc)

- **-c**, **--compressed**

  for compressed image data, show the true header which describes the compression rather than the data
