Image bit depth explained

Bit depth decides how many distinct values a pixel can hold. It is also the term most often used to mean two completely different things.

The numbers

8 bits per channel
256 levels each of red, green and blue — 16.7 million colours. The web standard.
10 bits per channel
1,024 levels each. Used by HDR and AVIF; far less banding.
16 bits per channel
65,536 levels each. For editing and print masters, not delivery.
8-bit indexed
A completely different thing: 256 colours in total, from a palette. PNG-8 and GIF.
1-bit
Black or white, nothing between. Fax and line art.
Effect on file size
Roughly proportional when uncompressed; much less so after compression.

Understanding bit depth

The ambiguity, cleared up first

"8-bit image" means two incompatible things depending on who is speaking, and this causes more confusion than the concept itself.

8 bits per channel means each of red, green and blue gets 256 levels, giving 16.7 million possible colours. This is the standard for photographs, JPEG and ordinary PNG. Photoshop calls it "8 Bits/Channel"; some people call the same file 24-bit, counting all three channels together.

8-bit indexed means the whole image is limited to 256 colours in total, chosen from a palette. This is PNG-8 and GIF, and it is dramatically more restrictive.

So a "24-bit PNG" and an "8-bit PNG" differ by a factor of 65,000 in available colours. When a tool offers to convert your image to 8-bit, find out which one it means.

What extra depth actually buys

More levels means finer gradations between adjacent values, and the place that shows is a gradient.

A sunset fading across 2,000 pixels of sky with only 256 available levels must repeat each level roughly eight times, and where the steps become visible you see banding — distinct stripes instead of a smooth fade. At 1,024 levels the steps are four times finer and effectively invisible.

Everywhere else, the difference is negligible. Photographic content with texture has enough variation to mask the quantisation, which is why 8 bits per channel has been sufficient for the web for thirty years.

Why editing wants more than delivery

Every adjustment redistributes the available levels. Brightening shadows stretches a narrow range of values across a wider one, and if there were only a few levels in that range to begin with, gaps appear — banding introduced by the edit rather than by the original capture.

Editing in 16 bits per channel gives an enormous surplus of levels to spend on those operations, so the result still has plenty left when it is finally reduced to 8 for delivery. This is why RAW files and print masters use high bit depth even though the final output does not.

The rule: edit high, deliver at 8 bits per channel unless you specifically need HDR.

Bit depth and file size

Uncompressed, the relationship is direct — doubling the bit depth doubles the data. A 4000 × 3000 image at 8 bits per channel is about 36 MB of raw pixels; at 16 bits it is about 72 MB.

After compression the relationship weakens considerably, because compressors exploit the fact that the extra precision is mostly predictable from its neighbours. A 16-bit PNG is typically well under twice the size of the 8-bit equivalent.

For lossy formats it barely applies at all: JPEG is 8-bit only, and AVIF's 10-bit mode often produces smaller files than 8-bit ones, because fewer bits are wasted correcting the banding that 8-bit would have introduced.

Which to use

Photographs on the web
8 bits per channel. JPEG and WebP support nothing else, and it is sufficient.
Wide gradients, skies, studio backdrops
Still 8-bit for delivery, but raise the encoder quality — banding here is usually quantisation, not depth.
HDR content
10-bit, which means AVIF. WebP and JPEG cannot carry it.
Editing and print masters
16 bits per channel, in PNG, TIFF or your editor's own format.
Logos and flat graphics
8-bit indexed is often perfect and much smaller — few colours, no gradients to band.

Try it yourself

Everything below runs in your browser, so you can test any of this on your own files without uploading them.

  • Compress PNG

    Lossless by default, with transparency carried through untouched.

    Open the tool
  • Compress JPEG

    Shrink JPG and JPEG photographs with a quality slider or an exact target size.

    Open the tool
  • Compress WebP

    Re-encode existing WebP files, or convert JPEG and PNG into WebP.

    Open the tool
  • Lossless compressor

    Zero quality loss, every pixel preserved exactly. Honest about how modest the saving is.

    Open the tool

Questions

Frequently asked questions

Every answer below is present in the page source, expanded, so it can be read without opening anything.

Is 8-bit or 24-bit better?

They are usually the same thing described differently — 8 bits per channel across three channels is 24-bit colour. The genuine distinction is against 8-bit *indexed*, which limits the whole image to 256 colours from a palette and is far more restrictive.

Does higher bit depth mean better quality?

Only where gradations are fine enough for it to matter, principally in gradients. On textured photographic content 8 bits per channel is indistinguishable from 16. Where it genuinely helps is during editing, because adjustments consume levels.

What causes banding in my images?

Usually compression rather than bit depth — quantisation leaves too few distinct values to represent a slow transition. Raise the quality first. If banding persists on a very wide, very smooth gradient, then 8-bit depth is genuinely the limit and AVIF's 10-bit mode is the answer.

Should I export at 16-bit?

Not for delivery. JPEG and WebP cannot store it, and browsers do not use it. Edit in 16-bit and export at 8 bits per channel — you get the benefit during the work without the file size afterwards.

What is the difference between PNG-8 and PNG-24?

PNG-8 is indexed: at most 256 colours from a palette, often several times smaller. PNG-24 is 8 bits per channel: full colour. Converting to PNG-8 is a lossy step, invisible on flat graphics and obvious on gradients and photographs.

Do I need 10-bit for HDR?

Yes. HDR requires the extra levels to describe its wider brightness range without banding, which in practice means AVIF — JPEG is 8-bit only and WebP does not support HDR.

From the blog

Related reading

Longer, more practical guides from the blog.

  • Image Formats

    PNG vs JPEG: When to Use Each, With the File Sizes to Prove It

    PNG stored the same photograph in 1274.1 KB where JPEG needed 67.5 KB — nineteen times larger. On a flat graphic PNG won. On a smooth gradient PNG lost to JPEG by a factor of two, which surprises most people.

    9 min read

  • Image Compression

    JPEG Quality Settings Explained: What the Number Actually Means

    Quality 80 is not 80% of anything. It is an index into a quantisation table. Measured on one photograph: dropping from 100 to 90 removes 77% of the file and 4.2 dB of fidelity; dropping from 40 to 30 removes 17% and costs almost as much.

    8 min read

  • Practical Guides

    How to Compress Images for a Website Without Wrecking Them

    Resize before you compress. Measured on one photograph: half the width at quality 80 produced a 16.4 KB file, while full width at quality 40 produced 20.6 KB and looked far worse. The order of operations matters more than the settings.

    8 min read