RAW in photography is a class of image files that store the minimally processed data read from the camera sensor, together with metadata describing how it was captured. Unlike a JPEG or HEIF file, a RAW file is not yet a finished picture: demosaicing, white balance, the tone curve, noise reduction and sharpening have not been applied permanently, so they can be decided later in image processing software.
RAW is not a single format. Most manufacturers use proprietary formats, such as CR3, NEF, ARW and RAF, while DNG (Digital Negative) is an openly documented container based on TIFF. The name is written in capitals by convention, but it is not an acronym; it simply means the data is still raw, much like an undeveloped negative.
What a RAW file contains
A RAW file stores the linear values of each photosite after analog-to-digital conversion, typically at 12 or 14 bits per photosite, rather than three finished color channels per pixel. On a Bayer sensor, each photosite records only red, green or blue, so the file holds a color filter array mosaic that must be interpolated into full color during demosaicing.
Alongside the sensor data, the file carries metadata and auxiliary data: exposure settings, the as-shot white balance multipliers, the black and white levels, lens information, the color matrix for the sensor, and usually an embedded JPEG preview. The camera histogram and the image on the rear screen are generated from that preview, not from the raw data itself.
The table summarizes the main components and what each one is used for during processing.
| Component | Content | Role in processing |
|---|---|---|
| Sensor data | Linear 12- or 14-bit photosite values | Source of all image detail and tone |
| Black and white levels | Sensor offset and saturation point | Defines the usable signal range |
| White balance multipliers | As-shot channel gains | Default color correction, freely editable |
| Color matrix or profile | Sensor-to-standard color conversion | Maps sensor response to a color space |
| Embedded preview | Camera-rendered JPEG | Camera display, histogram and fast browsing |
| Capture metadata | Exposure, lens, date, camera serial | Lens correction and cataloging |
From sensor data to a viewable image
Turning a RAW file into a viewable image is called RAW conversion or development, and it follows a fixed sequence of steps. A raw converter subtracts the black level, applies white balance, demosaics the mosaic into full RGB, converts sensor color into a working color space through a camera profile, applies a tone curve and gamma to fit human perception and display output, and finally performs noise reduction, sharpening and lens correction.
Every step is non-destructive: editing software stores the chosen settings as instructions in a catalog or sidecar file and leaves the original data untouched. Results differ between converters because each uses its own demosaicing algorithm, color profiles and default curves, which is why the same file can look different in two programs.
RAW compared with JPEG and HEIF
The essential difference is who makes the rendering decisions and when. A JPEG or HEIF file is rendered by the camera at the moment of capture and then compressed, while a RAW file postpones those decisions. The table compares the formats on the properties that matter most in practice.
| Property | RAW | JPEG | HEIF |
|---|---|---|---|
| Bit depth | 12–14 bits linear | 8 bits gamma-encoded | Typically 10 bits |
| White balance | Fully adjustable without loss | Baked in | Baked in |
| Highlight and shadow latitude | About 1–3 stops of recovery | Very limited | Somewhat better than JPEG |
| Compression | Uncompressed or lossless, sometimes lossy | Lossy | Lossy, more efficient |
| Typical file size, 24 MP | 25–50 MB | 6–12 MB | 3–8 MB |
| Ready to share | No, needs conversion | Yes, universal support | Yes, growing support |
The extra latitude comes from bit depth and linear encoding. A 14-bit file stores 16,384 levels per photosite, compared with 256 levels per channel in an 8-bit JPEG, so strong edits to exposure, shadows or color do not produce banding or posterization as quickly.
When to shoot RAW
RAW is the better choice whenever image quality and editing freedom matter more than speed and storage. It is standard practice in landscape, product, architecture and wedding work, and wherever exposure or light is difficult. JPEG remains reasonable when files must be delivered immediately or when volume and storage dominate.
| Situation | Recommended format | Reason |
|---|---|---|
| High-contrast landscape | RAW | Highlight recovery and shadow lifting |
| Mixed or uncertain light | RAW | White balance decided later without loss |
| News or sports delivered within minutes | JPEG | No conversion step before transmission |
| Long burst sequences | JPEG or compressed RAW | Larger buffer depth and faster card writes |
| Client work that may need retouching | RAW plus JPEG | Fast proofs with a full-quality master |
Many cameras also offer lossless compressed RAW, which reduces file size by roughly 30–50 percent with no data loss, and lossy compressed RAW, which saves more space but can show artifacts in extreme edits. Lossless compression is the safe default for most work.
Limitations and common misconceptions
- RAW does not recover fully clipped highlights: once every channel saturates, the data is gone; recovery works only while at least one channel holds detail.
- RAW is not completely unprocessed: many cameras apply black-level correction, defective pixel mapping and sometimes noise filtering before writing the file.
- The camera histogram describes the JPEG preview: it can show clipping that the raw data does not yet contain.
- Proprietary formats carry long-term risk: archiving in DNG or keeping current converter software reduces the risk of unreadable files.
- A RAW file looks flat at first: this is expected, because no creative tone curve or contrast has been applied yet.
Understanding it simply
A JPEG is like a meal that is already cooked. It is ready to eat, but you cannot change the recipe afterward. A RAW file is like the fresh ingredients: it takes some work before you can serve it, but you decide exactly how it turns out.
Because the camera keeps much more information in a RAW file, you can brighten dark areas, rescue bright skies and fix colors later without damaging the picture. The price is larger files and an extra editing step before the photo can be shared.
Applied in practice
A landscape photographer shoots a mountain lake at sunrise, with the sky several stops brighter than the shaded shoreline. To protect the bright clouds, the photographer underexposes by about one stop at ISO 100 and records 14-bit lossless compressed RAW files.
In the raw converter, the photographer lowers highlights to restore detail in the clouds, lifts shadows by roughly two stops to reveal the trees, and changes the white balance from the as-shot 5200 K to 6000 K to warm the sunrise light. None of these edits touches the original data.
The final image shows clean shadows and textured clouds without banding. The same edits applied to an 8-bit JPEG would have produced noisy shadows and posterized gradients in the sky.