# Lossless File Types Explained: How Each Format Compresses (2026)

> Lossless file types compared: how PNG, TIFF, WebP, JPEG XL, JPEG 2000, AVIF and DNG compress, and what each can hold in bit depth, alpha and metadata.

- Canonical HTML: https://revelraw.com/blog/lossless-file-types.html
- Markdown mirror of this page: https://revelraw.com/blog/lossless-file-types.md
- Published: 2026-11-13
- Language: English
- Machine-readable site index: https://revelraw.com/llms.txt · Full site as one file: https://revelraw.com/llms-full.txt

Published November 13, 2026 · Daniel Tello · RevelRaw

**Quick answer:** A lossless file type stores an image so that decoding returns exactly the values that were saved. PNG, TIFF with LZW, ZIP or no compression, WebP, JPEG XL and JPEG 2000 in their lossless modes, and RAW or DNG files with lossless compression all qualify. JPEG never does, and HEIF and AVIF files are almost always lossy. The types differ in what they can hold: TIFF, PNG, JPEG XL and JPEG 2000 keep 16 bits per channel while lossless WebP stops at 8, RAW and DNG keep sensor data rather than finished pixels, and TIFF is the usual lossless choice for CMYK print files.

Every lossless file type makes the same promise: open the file and you get back every value that went in. How each one keeps that promise differs, and so does what it can carry besides the pixels: bit depth, transparency, layers, camera metadata, and support in the apps and browsers you send it to.

This page is the reference for the file types themselves: how lossless compression works, what each format stores and where each one falls short. If you want to know which format to keep as your camera original, your editing master and your delivery copy, the guide to [lossless photo formats](https://revelraw.com/blog/lossless-photo-formats.md) covers that workflow.

Edit RAW photos free on your Mac.

RevelRaw · Your first full-quality export is free · macOS 26 or later · Apple M1 or later

[Try it on a RAW file](https://apps.apple.com/app/apple-store/id6773942240?pt=120914369&ct=BlogOutrank&mt=8)

## Which File Types Are Lossless?

The extension alone doesn't settle it. Several of these formats can be written lossless or lossy, and the setting used when the file was saved decides which one you have.

| Format | Lossless method | Bits per channel | Transparency | Limits |
| --- | --- | --- | --- | --- |
| PNG | Prediction filters, then DEFLATE; always lossless | 1 to 16 | Yes | No layers or CMYK; apps read its Exif data inconsistently |
| TIFF | None, LZW, ZIP or PackBits; can also hold lossy JPEG data | 8, 16 or 32-bit float | Yes | Large; layers only in Photoshop's own TIFF extension |
| WebP, lossless mode | Prediction and color transforms, back-references, Huffman coding | 8 | Yes | No 16-bit, so not a master for edited photos |
| JPEG XL, lossless mode | Adaptive prediction and entropy coding; can also repack a JPEG losslessly | 8, 16 or more, including floating point | Yes | Support outside Apple apps and Safari is recent |
| JPEG 2000, lossless mode | Reversible integer wavelet, then arithmetic coding | Up to 16 in photo use | Yes | Chrome and Firefox don't display it; few photo editors export it |
| HEIF and AVIF | Lossless modes exist but are rarely offered | 8 to 12 | Yes | Cameras, phones and most apps write them lossy |
| Camera RAW and DNG | Uncompressed, lossless or lossy, set in the camera or converter | Usually 12 or 14 of sensor data | No | Sensor data that still needs a RAW editor to become a picture |
| GIF | LZW | A palette of 256 colors | On or off only | A photo loses color when it is reduced to 256 colors |
| JPEG | None: lossy DCT compression | 8 | No | Each save compresses again |

Lossless means that decompressing the file returns exactly the values that were written, bit for bit. Bit depth is how many tonal steps each channel can hold: 8 bits give 256, 16 bits give 65,536. Compression describes how the data is packed for storage, not whether anything was thrown away, which is why a compressed PNG is lossless and a JPEG is not.

Uncompressed and lossless are two different claims. An uncompressed TIFF is lossless because nothing was packed at all. A ZIP-compressed TIFF is also lossless, because the packing can be undone exactly. But a TIFF can carry lossy JPEG data inside it, a DNG can be written with lossy compression, and a camera RAW can be uncompressed, losslessly compressed or lossy depending on the maker and the menu setting. Whether a particular file is lossless depends on the format and on the options used to write it.

See what RAW recovers on one of your own photos.

Pull back blown highlights and lift the shadows on a RAW you already have. Your first full-quality export is free.

macOS 26 or later · Apple M1 or later

[Try it on a RAW file](https://apps.apple.com/app/apple-store/id6773942240?pt=120914369&ct=BlogOutrank&mt=8)

## How Does Lossless Compression Work?

Lossless compression doesn't drop anything. It rearranges the numbers so repeats are easier to find, then writes the repeats in a shorter form. PNG shows the steps most clearly.

1. **Filter each scanline.** Each row of pixels passes through a filter that predicts every byte from its neighbors: the pixel to the left, the one above, or a combination of neighbors. What gets stored is the difference between the prediction and the actual value. On smooth areas those differences are small numbers, often zero. The [W3C PNG specification](https://www.w3.org/TR/2025/REC-png-3-20250624/) defines this as a deterministic, reversible filter applied before any compression happens.
2. **Compress the filtered data with DEFLATE.** DEFLATE does two jobs at once. LZ77 spots repeated byte patterns and swaps each repeat for a short back-reference to where it appeared earlier, looking back at most 32 KB in a PNG. Huffman coding then gives the most frequent values the shortest binary codes. Neither step knows what a pixel is.
3. **Reverse everything on open.** The decoder expands the Huffman codes, resolves the back-references, undoes the filter and hands back the original values. Because every step was reversible, the output matches the input exactly.

The other lossless types follow the same pattern of predict, then pack, with different tools:

- **TIFF:** LZW or ZIP (the same DEFLATE that PNG uses), optionally after a horizontal predictor that stores each pixel as its difference from the one to its left. PackBits only shortens runs of identical bytes.
- **Lossless WebP:** a choice of predictors per block, a color transform that removes the correlation between red, green and blue, an optional palette, then back-references and Huffman coding.
- **JPEG XL:** predictors chosen per region by a decision tree stored in the file, followed by entropy coding.
- **JPEG 2000:** a reversible integer wavelet that splits the image into coarse and fine detail, followed by arithmetic coding.
- **RAW and DNG:** DNG and several camera RAW formats use the lossless JPEG process from the 1992 JPEG standard, which predicts each sensor value from its neighbors and Huffman-codes the difference. Other makers use their own lossless codecs, and the DNG 1.7 specification adds JPEG XL. It has nothing to do with the lossy JPEG your camera saves next to the RAW.

Content decides how much any of these saves. A screenshot of a spreadsheet is mostly flat color and repeated rows, so the back-references hit constantly and the file shrinks a lot. A high-ISO night sky is full of random sensor noise, and random data has no repeats to point at, so the file stays large. On 16-bit photos the method matters too: in our [RAW vs TIFF test](https://revelraw.com/blog/raw-vs-tiff.md), LZW made 16-bit TIFFs larger than no compression in 15 of 16 files, while ZIP never did and saved a median 16%. A large lossless photo is the price of keeping every value, not a sign that something went wrong.

## What Does Each Lossless File Type Store?

### PNG: exact pixels, up to 16 bits

The [W3C's PNG overview](https://www.w3.org/Graphics/PNG/) describes PNG as a patent-free replacement for GIF that can also replace many common uses of TIFF, with sample depths from 1 to 16 bits per component (up to 48 bits per pixel for RGB, 64 with alpha) and an optional alpha channel. PNG 1.0 became a W3C Recommendation on October 1, 1996. The third edition, a W3C Recommendation since June 24, 2025, brings animated PNG, HDR color signaling and an Exif chunk into the core specification.

PNG suits screenshots, diagrams, logos and anything that needs transparency or exact pixels. A 16-bit RGB PNG keeps 48 bits per pixel before compression, so it can hold an edited photo without rounding its tones. Where it falls short: no layers, no CMYK, inconsistent handling of camera metadata between apps, and many photo exporters write 8-bit PNG only. PNG also stores rendered pixels, so it has no idea what your sensor recorded. The guide to [whether PNG is a lossless format](https://revelraw.com/blog/is-png-a-lossless-format.md) covers where a PNG export can still lose quality.

### TIFF: the container with the most options

TIFF is a container rather than a single recipe. It can hold an image with no compression, with lossless LZW, ZIP or PackBits, or with lossy JPEG data, at 8 or 16 bits per channel or in 32-bit floating point, in RGB, grayscale or CMYK, with transparency, an embedded color profile and EXIF, IPTC and XMP metadata. Photoshop can also save layers inside a TIFF, though other apps usually see only the flattened image. The [Library of Congress still-image format guidance](https://www.loc.gov/preservation/resources/rfs/stillimg.html) lists TIFF among its preferred formats for digital photographs and asks for the highest bit depth available, 16 bits per channel if available; it prefers uncompressed files and lists lossless compression as acceptable.

Use 16-bit TIFF with ZIP compression for print, retouching or handing a file to another editor, and declare a working color space when you export. If you're unsure which space to declare, the guide to [choosing a color profile for printing](https://revelraw.com/blog/color-profile-for-printing.md) walks through the practical options. Where TIFF falls short is size: in the RAW vs TIFF test, a 16-bit TIFF was a median 4.8 times the size of its RAW file.

### Lossless WebP: smaller graphics, 8 bits only

WebP has a separate lossless mode built for graphics. It keeps exact pixels and transparency and usually beats PNG on size, but it stores 8 bits per channel and no more. That makes it a good delivery format for logos, screenshots and interface graphics and a poor master for an edited photograph. Current versions of Chrome, Firefox, Edge and Safari display WebP. On a Mac running macOS 27.0.1, the built-in image tools opened a lossless WebP to exactly the pixels we encoded, but the Mac's command-line converter, sips, can't write WebP.

### JPEG XL: lossless at 16 bits, plus JPEG repacking

JPEG XL has a true lossless mode at 8, 16 or more bits per channel, with transparency and room for extra channels. It can also repack an existing JPEG into a smaller file that rebuilds the original JPEG bit for bit, which saves space without adding loss. In our test, macOS 27.0.1 decoded a 16-bit lossless JPEG XL to exactly the pixels we encoded. Safari has shown JPEG XL since version 17, and Chrome and Firefox added it only recently, so many upload forms and older apps still refuse it. iPhone 16 Pro and later can use JPEG XL compression inside ProRAW DNG files.

### JPEG 2000: the archive format

JPEG 2000's lossless mode uses a reversible integer wavelet, so the same file format can be written lossy or lossless. The Library of Congress lists JPEG 2000 as a preferred format alongside TIFF and PNG, and libraries use it for scanned collections. On the web it is close to useless: Chrome and Firefox don't display it, and few photo editors export it. A Mac reads and writes it through Preview and sips.

### HEIF and AVIF: lossless on paper

Both standards include lossless modes, and AVIF can store 10 or 12 bits per channel. In practice, iPhone HEIC photos, camera HEIF files and the export dialogs of most editors are lossy, and few tools offer a lossless option at all. Treat a HEIF or AVIF file as lossy unless the app that wrote it said otherwise.

### RAW and DNG: lossless sensor data

A RAW file stores one value per photosite, usually 12 or 14 bits, before demosaicing turns it into a color picture. Whether it is lossless depends on the camera setting. A Sony body set to Lossless Compressed (L) writes an ARW that decompresses to the full sensor data, while the reduced-size M and S options on a full-frame body store processed color pixels rather than sensor data; the [Sony compressed vs uncompressed RAW lab](https://revelraw.com/blog/sony-compressed-vs-uncompressed-raw.md) measured the difference. The guide to [how big a RAW file is](https://revelraw.com/blog/how-big-is-a-raw-file.md) covers file sizes by compression mode.

DNG works the same way: a raw DNG can hold lossless or lossy sensor data, and a linear DNG holds demosaiced pixels instead. Converting a lossless RAW to DNG keeps the sensor values, though [not every maker note comes across](https://revelraw.com/blog/dng-vs-raw.md). If you are deciding whether a TIFF can stand in for the RAW, the comparison of [RAW versus TIFF](https://revelraw.com/blog/raw-vs-tiff.md) sets out what each one can and cannot carry forward.

## Where Can a Lossless File Type Still Lose Data?

Lossless compression only protects what reaches the encoder. These steps change the image before that, and a lossless file type keeps their result faithfully:

- **Bit depth reduction:** saving a 16-bit edit as an 8-bit PNG or TIFF rounds every tone to one of 256 steps per channel.
- **Color space conversion:** converting a wide-gamut image to sRGB clips colors sRGB can't hold.
- **Resizing:** downsizing discards pixels and upsizing invents them. If you're changing dimensions before you export, the order of operations matters more than the container choice; the walkthrough on [resizing an image without losing quality](https://revelraw.com/blog/how-to-resize-an-image-without-losing-quality.md) covers the sequence that avoids double resampling.
- **Palette reduction:** a GIF or an 8-bit palette PNG holds at most 256 colors, so a photo saved that way loses color before the lossless compression starts.
- **A lossy codec in a lossless container:** a TIFF with JPEG compression, a lossy DNG or a Sony M or S RAW carries the familiar extension and still discards data.
- **Flattening and stripping:** exporting a layered file flattens it, and many exports drop metadata or GPS on purpose.

You can check a setting yourself. Export a file, reopen it, export it again with the same settings and compare the two with a difference blend in your editor. If any pixel moved, something in that path is lossy.

The destination often decides the file type for you. A printer, a stock agency or a client portal may want one format and refuse others. For printed work, ask before you export. A print shop's product page usually covers the print, not the file: the [leaflet know-how from The Print Warehouse](https://theprintwarehouse.uk/printshop/leaflet-printing), a UK printer, walks through flat, folded and Z-creased leaflets, gloss, matte and silk finishes, and runs from 50 to 100,000 copies, so confirm the file format with the shop rather than guess. For which format to send to the web, a lab or social media, see the destination table in the guide to [lossless photo formats](https://revelraw.com/blog/lossless-photo-formats.md).

## Which Lossless File Types Does RevelRaw Export?

We make RevelRaw, a native RAW editor for Macs with macOS 26 or later on Apple M1 or later. It opens 24 RAW extensions from 15 brands, including ARW, NEF, CR3 and DNG, and processes them on your Mac with no account. For lossless files it exports PNG (8-bit) and TIFF (8- or 16-bit), plus a full-resolution 16-bit linear DNG with your edits baked in, which other RAW editors can open and keep adjusting from that baked result. JPEG and HEIF exports are 8-bit lossy delivery copies. Every format except DNG can be exported in sRGB, Display P3 or Adobe RGB, exports can't overwrite the original file, and a Location option removes GPS data on export.

Editing is free and the download includes one full-quality export, enough to export a 16-bit TIFF from one of your RAW files and compare it with the original. Visit [RevelRaw](https://revelraw.com) to see what it opens, or [Get RevelRaw on the Mac App Store](https://apps.apple.com/app/apple-store/id6773942240?pt=120914369&ct=BlogOutrank&mt=8) (requires macOS 26 or later on an Apple M1 or later Mac).

See what RAW recovers on one of your own photos.

Pull back blown highlights and lift the shadows on a RAW you already have. Your first full-quality export is free.

macOS 26 or later · Apple M1 or later

[Try it on a RAW file](https://apps.apple.com/app/apple-store/id6773942240?pt=120914369&ct=BlogOutrank&mt=8)

## FAQ

### Is lossless compression the same as uncompressed?

No. An uncompressed file stores every value as is. A losslessly compressed file packs the same values into less space and unpacks them exactly when it opens. Both decode to identical pixels, so the difference is file size and save speed, not quality.

### Why do some photos shrink more than others when saved losslessly?

Lossless compression works by finding repeats. Flat color, smooth skies and screenshots have many, so they shrink a lot. Fine texture and high-ISO noise have few, so the file stays large. On 16-bit TIFFs, LZW can even make the file bigger than no compression, while ZIP rarely does.

### Which lossless file types keep 16 bits per channel?

TIFF, PNG, JPEG XL and JPEG 2000 can all store 16 bits per channel losslessly, and TIFF and JPEG XL can also store floating point. Lossless WebP and GIF stop at 8 bits. RAW and DNG files hold the sensor's own 12 or 14 bits per photosite.

### Can a Mac open lossless WebP, JPEG XL and AVIF files?

Yes. In our test on macOS 27.0.1, the Mac's built-in image tools opened a lossless WebP and a 16-bit lossless JPEG XL to exactly the pixels that were encoded, and AVIF opens too. The command-line converter sips can write AVIF but not WebP or JPEG XL.

### Does converting between lossless file types lose quality?

Not if the bit depth, color space and size stay the same: a 16-bit TIFF saved as a 16-bit PNG decodes to the same pixels. Quality is lost when the conversion also drops to 8 bits, changes the color space, flattens layers or resizes, or when the target is lossy, such as JPEG.

### Is a lossless JPEG the same as a high-quality JPEG?

No. A JPEG at quality 100 is still lossy. Lossless JPEG is a separate process from the 1992 standard that photo apps almost never offer, though DNG and several RAW formats use it inside the file. JPEG XL can also repack an existing JPEG losslessly, keeping the earlier loss but adding none.
