File types · Explainer

The TIFF file (.tiff, .tif)

A TIFF file is a flexible container for raster images, used wherever quality matters more than size: scanning, printing, archives, maps and science. This guide explains what's inside one, its many compression options and variants, the quirks worth knowing, and has free sample TIFF files to download for testing.

At a glance

Full name
Tagged Image File Format
Extensions
.tif, .tiff (the same format); BigTIFF files usually keep .tif
MIME type
image/tiff (RFC 3302); image/tiff-fx for the fax profile
Kind
Binary raster image container; uncompressed, lossless or lossy, depending on the compression chosen
Standard or owner
TIFF Revision 6.0 (1992), written by Aldus; Adobe has owned it since buying Aldus. Profiles are standardised by ISO, such as TIFF/EP and TIFF/IT
First released
1986, by Aldus Corporation with scanner makers and software developers
Colours
Bilevel, greyscale, palette, RGB, CMYK, YCbCr or CIE L*a*b*; 1 to 16 bits per sample is common, 32-bit floating point with extensions
Max file size
4 GB (32-bit offsets); BigTIFF uses 64-bit offsets to go far beyond
Magic number
49 49 2A 00 (II*, little-endian) or 4D 4D 00 2A (MM, big-endian); BigTIFF uses 2B (43) instead of 2A (42)
Opens with
Windows Photos, macOS Preview, GIMP, Photoshop and most image editors; among browsers, only Safari

The basics

What is a TIFF file?

TIFF is one of the oldest image formats still in everyday use. Aldus Corporation, the maker of PageMaker, published it in 1986 with scanner manufacturers and software developers, so scanners and desktop publishing programs had one format to exchange images in. Revision 6.0, from June 1992, is still the current specification; Adobe has owned it since it bought Aldus.

Where JPEG and PNG each define one way of compressing pixels, TIFF is a container with tags: a list of numbered fields says how big the image is, how the colours are stored, which compression was used and where the data sits. That flexibility is why TIFF turns up in very different places:

  • Scanning and fax: document scanners and fax software save black-and-white pages as compressed TIFF, often several pages per file.
  • Print and publishing: CMYK images at 300 DPI for magazines and books, lossless and unchanged by re-saving.
  • Photography and archives: 16-bit master copies of photos and digitised collections. Many camera raw formats, including Adobe DNG and Nikon NEF, are built on the TIFF structure, and the Exif block inside a JPEG is a small TIFF directory.
  • Maps and science: GeoTIFF for satellite images and elevation data, and TIFF variants for microscopy and other scientific imaging.

The flip side: a "TIFF" can be almost anything inside, and not every program supports every option. A file that opens in one app can fail in another.

Anatomy

What's inside a TIFF file

A TIFF file is an 8-byte header followed by one or more image file directories (IFDs). Each IFD is a list of tags: numbered fields that describe one image and point to its pixel data. The pixel data can sit anywhere in the file. Here are the first bytes of sample-photo.tif and a map of its single IFD.

sample-photo.tif (hex and IFD map)
49 49 2A 00 08 00 00 00
13 00
00 01 04 00 01 00 00 00 20 03 00 00
01 01 04 00 01 00 00 00 15 02 00 00
…

offset  part
000000  header: "II" (little-endian), 42, first IFD at offset 8
000008  IFD 0: 19 entries of 12 bytes, sorted by tag number
          tag   name               type      value
          0100  ImageWidth         LONG      800
          0101  ImageLength        LONG      533
          0102  BitsPerSample      SHORT ×3  8, 8, 8        → at 242
          0103  Compression        SHORT     5 (LZW)
          0106  Photometric        SHORT     2 (RGB)
          010E  ImageDescription   ASCII     66 bytes       → at 248
          0111  StripOffsets       LONG ×34  where each strip starts
          0115  SamplesPerPixel    SHORT     3
          0116  RowsPerStrip       LONG      16
          0117  StripByteCounts    LONG ×34  each strip's length
          011A  XResolution        RATIONAL  300/1          → at 586
          011B  YResolution        RATIONAL  300/1
          011C  PlanarConfig       SHORT     1 (RGBRGB…)
          0128  ResolutionUnit     SHORT     2 (inch)
          0131  Software           ASCII
          0132  DateTime           ASCII     2026:10:27 12:00:00
          013B  Artist             ASCII     Ada Example
          013D  Predictor          SHORT     2 (horizontal)
          8298  Copyright          ASCII     99helpers.com/…
0000EE  next IFD offset: 0, so there are no more pages
0000F2  values too big for their entries: text, tables, rationals
0002E0  34 strips of LZW data, 16 rows each, 627,981 bytes
        end of file at 628,717 bytes
  1. 149 49

    Byte order

    II (from Intel) means every number in the file is little-endian, least significant byte first; MM (from Motorola) means big-endian. Readers must handle both, which is why TIFF tools can open files from any computer.

  2. 22A 00

    The magic number 42

    Always 42 in a classic TIFF, in the file's byte order. A BigTIFF has 43 here and a different header layout.

  3. 308 00 00 00

    Offset of the first IFD

    The directory starts at byte 8, straight after the header. It doesn't have to: many programs write the pixels first and the IFD at the end, and the offset just points there.

  4. 413 00

    Entry count

    19 entries (13 hex). The entries must be sorted by tag number.

  5. 500 01 04 00 01 00 00 00 20 03 00 00

    One IFD entry

    12 bytes: tag 0x0100 (ImageWidth), type 4 (LONG, a 32-bit number), count 1, value 0x0320 = 800. If a value fits in 4 bytes it's stored right here; if not, these 4 bytes hold the offset of the value elsewhere in the file.

  6. 60103 Compression, 013D Predictor

    How the pixels are packed

    Compression 5 is LZW. Predictor 2 means each pixel was stored as its difference from the pixel to its left before compressing, which helps a lot on photos and smooth gradients.

  7. 70111 StripOffsets, 0117 StripByteCounts

    Where the pixels are

    The image is cut into 34 horizontal strips of 16 rows. These two tables give each strip's position and length, so a reader can decode any part of the image without reading the rest.

  8. 80000EE: 00 00 00 00

    Next IFD offset

    After the entries comes the offset of the next IFD. Zero means this is the last image. In a multi-page TIFF it points to page 2, and so on.

  9. 90002E0: 80 07 48 28 …

    The image data

    627,981 bytes of LZW-compressed strips, 49% of the 1,279,200 bytes the pixels take uncompressed. Photos with fine grain and noise compress poorly with lossless methods like this one.

Under the hood

TIFF compression: none, LZW, Deflate, JPEG, fax and more

The Compression tag (259) says how the pixels are packed. The same picture can be saved several ways, and the choice decides both the file size and which programs can open it:

ValueNameKindTypical use
1NoneUncompressedMaximum compatibility; very large files
2, 3, 4CCITT modified Huffman, Group 3, Group 4Lossless, black and white onlyFax and scanned documents; Group 4 is the most compact
5LZWLosslessGeneral use; the usual "compressed TIFF" option
7JPEGLossyPhotos where size matters; value 6 is an older, obsolete JPEG method
8Deflate (Adobe)LosslessOften smaller than LZW, especially for 16-bit images; the ZIP option in Photoshop
32773PackBitsLossless run-lengthSimple graphics; part of Baseline TIFF
50000, 50001Zstandard, WebPLossless or lossyNewer libtiff and GIS options, not part of TIFF 6.0; many programs can't read them

LZW and Deflate are often combined with a predictor (tag 317): value 2 stores each sample as the difference from its left neighbour, which makes smooth images far more compressible. Our 16-bit gradient sample holds 4,718,592 bytes of pixels in a 38,753-byte file, thanks to Deflate and the predictor.

Why LZW was once a problem

TIFF 6.0 moved LZW out of the Baseline part of the specification "due to licensing issues": Unisys held a patent on LZW, the same one that affected GIF. The patents have long since expired, and LZW is now the most widely supported compressed TIFF.

Variants

Multi-page TIFF, tiles, BigTIFF, GeoTIFF and other variants

Because each IFD ends with the offset of the next one, a TIFF can hold a chain of images. The specification calls them subfiles; most people call them pages. Our sample-multipage.tif has three, each with its own size, colour type and compression. Baseline TIFF readers are only required to read the first one, which is why some viewers show page 1 and nothing else.

Images can also be stored in tiles (square blocks, for example 256 × 256) instead of strips. Tiles let a viewer decode just the part of a huge image on screen, which is how map and microscopy viewers pan around files of many gigapixels. Our sample-16bit-tiled.tif uses 256 × 256 tiles.

VariantWhat it is
BigTIFFVersion 43 instead of 42, with 64-bit offsets, so files can grow far beyond the 4 GB limit of classic TIFF. Defined in 2004 and supported by libtiff 4 and most GIS and scientific tools; many ordinary viewers can't open it.
GeoTIFFA normal TIFF with extra tags that place the image on the Earth: its coordinate system and where each pixel lies. An OGC standard (version 1.1, 2019). Opens as a plain image in apps that ignore the tags.
Pyramidal (tiled) TIFFThe image plus smaller copies of itself in extra IFDs, for fast zooming in image servers.
TIFF/EP and DNGTIFF-based formats for camera raw data, with an ISO standard (TIFF/EP) and Adobe's Digital Negative.
TIFF/ITAn ISO profile for exchanging finished pages in print production.
TIFF-FXThe profile used for internet fax, with its own media type, image/tiff-fx.

Comparison

TIFF vs PNG, JPG and PDF

TIFFPNGJPGPDF
CompressionNone, lossless or lossy: your choiceLosslessLossyAny, per image
Bits per channel1 to 16, or 32-bit floatUp to 168 (usually)Depends on the images inside
CMYKYesNoYesYes
Several pagesYesNoNoYes
BrowsersSafari onlyAllAllAll, in a built-in viewer
Best forScans, print, archives, mapsScreenshots and graphicsPhotos to shareDocuments to read and print
  • Archive master or print file: TIFF, uncompressed or with LZW or Deflate.
  • Screenshots and web graphics: PNG. It's lossless too, and every browser shows it.
  • Photos to share or put online: JPG, WebP or AVIF, converted from the TIFF master.
  • A scanned document for people to read: PDF, which most people can open; it can contain the same fax-compressed pages.

Troubleshooting

Why won't my TIFF open, or show all its pages?

  • It won't show in the browser. Chrome, Edge and Firefox don't display TIFF; only Safari does. Convert to PNG or JPEG for the web.
  • "Unsupported compression". The file uses an option the program doesn't have, often JPEG-in-TIFF, Zstandard or WebP. Open it in GIMP or a libtiff-based tool and re-save with LZW or no compression.
  • Only the first page shows. Many viewers ignore every IFD after the first. Use Preview on a Mac, GIMP (which offers to open pages as layers or separate images), or split the file with tiffsplit.
  • Colours look wrong. CMYK files need colour conversion, and 16-bit or floating-point files need scaling; simple viewers get both wrong. Transparency stored as an "extra sample" can also be read as premultiplied or not, and apps disagree.
  • The file is enormous. It's probably uncompressed. Re-save with LZW or Deflate and a predictor; nothing is lost.
  • It stops at 4 GB. Classic TIFF can't address more. Save as BigTIFF, or split the image into several files.

How to

How to open, edit and convert a TIFF file

  • Open it: double-click. Windows Photos and macOS Preview open common TIFFs, and Preview lists the pages of a multi-page file in its sidebar. GIMP, Photoshop, Affinity Photo and IrfanView handle most variants; QGIS opens GeoTIFFs on a map.
  • Convert to PNG or JPEG: File > Export in Preview; magick scan.tif scan.png with ImageMagick (multi-page files become one PNG per page; scan.tif[0] takes only the first).
  • Make a multi-page TIFF into a PDF: tiff2pdf -o scan.pdf scan.tif from libtiff keeps fax-compressed pages compact; magick scan.tif scan.pdf also works.
  • Change the compression: tiffcp -c lzw:2 in.tif out.tif (LZW with the predictor), tiffcp -c zip in.tif out.tif (Deflate) or tiffcp -c g4 in.tif out.tif (Group 4, black and white only).
  • Inspect it: tiffinfo file.tif lists every page and its tags; tiffdump shows the raw IFD entries; exiftool file.tif shows metadata; gdalinfo shows GeoTIFF coordinates.

Security

Privacy and security: hidden pages, layers and metadata

A TIFF can't run code, but it can hold more than a quick look reveals:

  • Pages you didn't see. A viewer that shows only page 1 hides every page after it. Before sending a scanned TIFF, check the page count with tiffinfo or Preview's sidebar.
  • Photoshop layers. Photoshop can save layers inside a TIFF in its own private tag. Other apps show only the flattened image, but the layers, including hidden ones, travel with the file. Flatten before sharing.
  • Metadata. Exif (with GPS for camera images), XMP and IPTC blocks, plus plain tags such as Artist, Software and DateTime. exiftool -all= file.tif removes most of it.
  • Decoder bugs and bombs. libtiff has had many security fixes over the years, and a small file can declare huge dimensions. Keep image libraries updated, and check width and height before decoding uploaded files.

Free downloads

Sample TIFF files to download

Free sample TIFF files covering LZW, Deflate, JPEG and fax compression, multiple pages, tiles, 16 bits per channel, CMYK and BigTIFF, plus an exact 1 MB file. Each one reads cleanly in libtiff, Pillow, tifffile and ImageMagick. Most browsers can't display TIFF, so download them to look inside.

sample-photo.tif · 614.0 KBDownload

Browsers can't show this kind of file in a page. Download it to open it in the app it belongs to.

What's inside sample-photo.tif

sample-photo.tif is an 800 × 533 RGB image compressed with LZW, the most common kind of compressed TIFF. Run tiffinfo or tiffdump on it to see these parts.

  1. Little-endian header

    II, 42, and the first IFD at offset 8, straight after the header.

  2. 19 tags in one IFD

    Size, bit depth, compression, colour type, strip layout, resolution and five text tags. Every tag is listed in the anatomy above.

  3. LZW with predictor 2

    Each pixel is stored as its difference from the one to its left, then compressed with LZW.

  4. 34 strips of 16 rows

    Each strip is compressed separately, so a reader can decode a band of the image on its own.

  5. 300 DPI

    XResolution and YResolution of 300 per inch. On screen this changes nothing; when printed, the image comes out about 6.8 cm wide.

  6. Text tags

    ImageDescription, Software, DateTime, Artist (Ada Example, fictional) and Copyright, which points to this page.

All sample TIFF files

  • LZW-compressed TIFF photo

    sample-photo.tif · 614.0 KB (628,717 bytes)

    An 800 × 533 RGB synthetic landscape, 8 bits per channel, LZW with the horizontal predictor in 34 strips, at 300 DPI.

    • Checking an app or upload form accepts TIFF
    • Testing conversion from TIFF to PNG or JPEG
  • Multi-page TIFF (3 pages)

    sample-multipage.tif · 337.4 KB (345,472 bytes)

    Page 1: an A4 black-and-white document page at 200 DPI in CCITT Group 4 (10,559 bytes of data for about 484 KB of pixels). Page 2: 8-bit greyscale with Deflate. Page 3: RGB with JPEG compression.

    • Checking viewers and converters see every page
    • Testing fax, Deflate and JPEG-in-TIFF decoding
  • 16-bit tiled TIFF

    sample-16bit-tiled.tif · 37.8 KB (38,753 bytes)

    1024 × 768 RGB gradients at 16 bits per channel, in 256 × 256 tiles with Deflate and the predictor. The dark band at the top is where 8-bit conversions show steps after editing.

    • Testing tiled and 16-bit decoding
    • Checking a pipeline keeps 16-bit depth
  • CMYK TIFF

    sample-cmyk.tif · 28.5 KB (29,169 bytes)

    An 800 × 500 print-style colour bar chart in CMYK (photometric "separated"): solid inks, overprints and 0 to 100% tint ramps, LZW at 300 DPI.

    • Spotting software that shows CMYK with wrong colours
    • Testing colour conversion in thumbnailers
  • BigTIFF

    sample-bigtiff.tif · 352.1 KB (360,576 bytes)

    A small 400 × 300 uncompressed RGB image in the BigTIFF layout: version 43 and 64-bit offsets. Readers without BigTIFF support reject it.

    • Checking whether a tool supports BigTIFF
    • Testing format detection by magic number
  • 1 MB TIFF file

    sample-1mb.tiff · 1 MB (1,048,576 bytes)

    A 600 × 580 uncompressed RGB image, padded through its ImageDescription tag to exactly 1,048,576 bytes (1 MiB). Uses the .tiff spelling.

    • Upload limits at exactly 1 MiB
    • Checking both `.tif` and `.tiff` are accepted

Ways to test with them

  • Extension handling: upload sample-photo.tif and sample-1mb.tiff. Forms that check extensions often accept one spelling and not the other.
  • Every page: convert sample-multipage.tif to PDF or PNG. You should get three pages, the first a black-and-white document.
  • Compression support: if sample-multipage.tif fails on page 3 only, the tool lacks JPEG-in-TIFF; if sample-bigtiff.tif fails, it lacks BigTIFF.
  • Bit depth and colour: load sample-16bit-tiled.tif and check for 16 bits per channel; convert sample-cmyk.tif to RGB and check the cyan, magenta and yellow bars keep their colours.
  • Size limits: sample-1mb.tiff is exactly 1,048,576 bytes, so you can test a 1 MiB limit at the boundary.

Free to use for testing, teaching and demos, commercially or not, with no attribution needed. A link back to this page is always appreciated.

Put it online

Have a TIFF file? Give it a link.

Drop a TIFF on 99helpers and it gets its own web address to share. Safari shows TIFF images in the browser; in other browsers the link downloads the file, so convert to PNG or JPEG first if everyone should see it straight away.

Questions

TIFF files, frequently asked

What's the difference between .tif and .tiff?

None. They're the same format; .tif comes from systems that only allowed three-letter extensions. You can rename one to the other.

How do I open a TIFF file?

Double-click it: Windows Photos and macOS Preview open most TIFFs. For unusual ones (CMYK, 16-bit, multi-page, GeoTIFF), use GIMP, Photoshop, IrfanView or QGIS.

Is TIFF lossless?

Usually. Uncompressed, LZW, Deflate, PackBits and fax compression are all lossless. TIFF can also use JPEG compression, which is lossy, so check the Compression tag.

Why are TIFF files so big?

Many are uncompressed, and even lossless compression can't shrink a detailed photo much. A 24-megapixel photo is about 72 MB uncompressed at 8 bits per channel, and twice that at 16 bits.

Can a TIFF have multiple pages?

Yes. Each page is its own image directory in the same file. Fax and scanning software use this a lot, but some viewers only show the first page.

Should I use TIFF or PNG?

PNG for anything on screen or on the web. TIFF when you need CMYK, multiple pages, tiles, files over a few gigabytes, or a format your print shop, scanner or GIS software expects.

How do I convert TIFF to PDF?

On a Mac, open it in Preview and choose File > Export as PDF. On the command line, tiff2pdf -o out.pdf in.tif or magick in.tif out.pdf. Each page of the TIFF becomes a page of the PDF.

What is BigTIFF?

A version of TIFF with 64-bit offsets, for files larger than the 4 GB limit of classic TIFF. It starts with 43 instead of 42 and needs software that supports it.

Related formats

Other file types explained

Keep going

Related

Sources

Last reviewed 27 October 2026.