{"id":"image-fits","mimeType":"image/fits","name":"Flexible Image Transport System","shortName":"FITS","category":"Scientific \u0026 Astronomical","extensions":[".fits",".fit",".fts"],"description":"FITS (Flexible Image Transport System) is an open standard and the most widely used digital file format in astronomy. Designed specifically for scientific data, it supports N-dimensional arrays (like 2D images or 3D data cubes) and multi-extension data tables, paired with extensive human-readable ASCII headers.","seo":{"title":"image/fits MIME Type | Complete Developer Reference \u0026 Magic Bytes","description":"Complete reference for the image/fits MIME type: magic bytes, software support, HTTP headers, developer snippets, and technical specifications for FITS astronomical images.","faqs":[{"question":"What is the magic byte for a FITS file?","answer":"Every standard FITS file begins with the ASCII string 'SIMPLE  = ' (including the spaces). In hex, this 10-byte signature is 53 49 4D 50 4C 45 20 20 3D 20."},{"question":"Is image/fits or application/fits the correct MIME type?","answer":"Both are used in practice, but 'image/fits' was officially registered with IANA (RFC 4047). However, because FITS can contain complex binary tables and non-image data, many systems still default to 'application/fits'."},{"question":"Can I view FITS files in a web browser?","answer":"No, FITS is a specialized scientific format with zero native browser support. Viewing FITS data on the web requires JavaScript libraries (like FITS.js) to parse the binary arrays and render them onto an HTML5 Canvas."}]},"index":{"compression":["Uncompressed","Tile Compressed (Rice, GZIP)"],"browserSupport":{"score":1,"label":"None"},"commonUses":["Astronomy \u0026 Astrophysics","Space Telescope Data (Hubble, JWST)","Scientific Data Archiving","Spectroscopy"]},"technical":{"magicBytes":{"hex":"53 49 4D 50 4C 45 20 20 3D 20","ascii":"SIMPLE  = "},"container":"FITS","compressionAlgorithm":["Uncompressed","Rice","GZIP","Hcompress"],"colorDepth":["8-bit","16-bit","32-bit","64-bit (Float/Double)"],"transparency":false,"animation":false,"metadata":{"exif":false,"xmp":false,"iccProfile":false},"alphaChannel":false,"progressiveLoading":false,"hdrSupport":true},"history":{"developer":"IAU FITS Working Group / NASA","released":"1981","specification":"FITS Standard Version 4.0"},"browserSupport":{"chrome":false,"chromeVersion":"None","firefox":false,"firefoxVersion":"None","safari":false,"safariVersion":"None","edge":false,"edgeVersion":"None","internetExplorer":false},"softwareSupport":[{"name":"SAOImageDS9","logo":""},{"name":"ESA/ESO/NASA FITS Liberator","logo":""},{"name":"Astropy (Python)","logo":""},{"name":"GIMP","logo":"gimp.svg"},{"name":"ImageMagick","logo":"image-magic.webp"}],"conversion":{"convertTo":["tiff","png","jpeg","csv"],"convertFrom":["tiff","csv"]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/fits"}],"htmlAccept":"image/fits, application/fits, .fits, .fit","fileDetection":["Read the first 8 bytes and verify the string is exactly 'SIMPLE  ' (padded with spaces).","FITS headers are always written in 2880-byte logical records containing 80-character ASCII card images."]},"prosCons":{"pros":["The undisputed global standard for archiving and sharing astronomical data","Self-documenting: Headers are written in plain ASCII, ensuring data is readable decades later regardless of software","Supports incredibly high dynamic range, N-dimensional arrays, and complex binary tables"],"cons":["No support in standard consumer software or web browsers","Uncompressed raw FITS files from modern telescopes can be excessively large","Does not use standard metadata models like EXIF or XMP, requiring specialized parsers"]},"specifications":{"url":"https://fits.gsfc.nasa.gov/fits_standard.html","rfc":"RFC 4047","mimeAliases":["application/fits"]},"developerSnippets":{"python":"import magic\nprint(magic.from_file('galaxy.fits', mime=True)) # Outputs 'image/fits' or 'application/fits'","nodejs":"const FileType = require('file-type');\nconst type = await FileType.fromFile('galaxy.fits');\nconsole.log(type?.mime); // Custom parsing required if file-type lacks FITS signatures","go":"import \"net/http\"\n// HTTP standard library may fail. Check bytes manually:\nif bytes.HasPrefix(buf, []byte(\"SIMPLE  = \")) {\n    fmt.Println(\"image/fits\")\n}","php":"$mime = mime_content_type('galaxy.fits');\necho $mime; // Standard databases often map this to application/fits or application/octet-stream"},"relatedFormats":["tiff"]}
