RAW File Documentation
Summary
A RAW (Raw Camera Image) file holds the unprocessed data straight off a digital camera’s sensor — a “digital negative” before any in-camera white balance, sharpening or JPEG compression. The literal .raw extension is a generic label used by several makers (Panasonic, Leica, Casio), so there is no single format or magic number. Its MIME type is image/x-raw. Develop it free in darktable or RawTherapee, then export to JPG or DNG. Note: .raw can also mean raw audio or a disk image, which photo apps cannot open.
Technical details
| Feature | Value |
|---|---|
| Full name | Raw Camera Image (generic .raw) |
| File extension | .raw |
| MIME type | image/x-raw |
| Format type | Unprocessed camera sensor image data (binary, vendor-specific) |
| Developer | Various camera makers — no single owner |
| Used literally by | Panasonic, Leica, Contax, Casio, Phase One, some Nikon scanners |
| Open standard | No — each vendor’s .raw has its own layout |
| Magic number | None universal (some TIFF-based: 49 49 2A 00 / 4D 4D 00 2A; others proprietary) |
| Sensor pattern | Bayer or X-Trans colour filter mosaic (undemosaiced) |
| Bit depth | Typically 12–14 bits per pixel (vs 8-bit JPEG) |
| Decoders | LibRaw / dcraw with per-camera profiles |
| Free software | darktable, RawTherapee, GIMP, IrfanView (+ RAW plugin) |
| Also means | Headerless PCM audio; raw disk/RAM image (.dd/.img); raw binary/voxel data |
| Branded raw siblings | .cr2/.cr3, .nef, .arw, .rw2, .orf, .raf, .dng |
| Related extensions | .cr2, .nef, .arw, .dng, .rw2, .orf, .tiff, .jpg |
| Specification | libraw.org (decoder / supported cameras) |
What is a RAW file?
Unlike most entries on this site, .raw is not one defined format. It is a generic label, and its dominant meaning is a raw camera image: the unprocessed data captured by a digital camera’s image sensor, kept before any in-camera demosaicing, white balance, sharpening or JPEG compression. Photographers call this a “digital negative” because, like a film negative, it holds the full captured information and must be developed before it looks like a finished photo.
Several camera and scanner makers historically used the literal .raw extension — Panasonic, Leica, Contax, Casio, Phase One, and some Nikon film scanners — each with its own internal layout. Most brands have since moved to branded raw extensions instead: Canon CR2/CR3, Nikon NEF, Sony ARW, Panasonic RW2, Olympus ORF, Fujifilm RAF, and the open Adobe DNG. Because every vendor’s .raw differs, there is no universal reader and no single magic number for the extension. This page describes the camera-image meaning; be aware upfront that the same three letters are used for completely unrelated things, covered below.
Which RAW is it? Photo, audio, or disk image
The first practical question is not “how do I open it” but “which kind of .raw is this,” because forcing a photo app onto the wrong one wastes time. The extension is overloaded across three unrelated domains.
.raw meaning what it is opens with
────────────────────── ──────────────────────────────── ──────────────────────
Camera raw image undeveloped sensor data darktable, RawTherapee…
Raw audio (PCM) headerless sound samples Audacity → Import → Raw Data
Raw disk / RAM image bit-for-bit dump (.dd / .img) forensics / VM tools
Raw binary / voxel plain array of bytes the producing application
Raw audio is uncontainerized PCM: sample values with no header at all, so a player cannot even guess the sample rate or bit depth — you must supply them manually (Audacity’s “Import Raw Data” asks for exactly that). A raw disk or memory image is a bit-for-bit copy used in forensics and virtualization, not a picture. And scientific tools export plain .raw arrays (for example volumetric voxel grids) whose meaning depends entirely on the program that wrote them. None of those open in a photo editor. If a raw developer flatly cannot read your .raw, the likeliest explanation is that it is one of these, not a camera file.
Why there is no single signature
A defined format like PNG starts with fixed magic bytes; .raw does not, and that is the honest core of the format. Some vendor .raw files are built on TIFF and therefore begin with a TIFF byte-order mark (49 49 2A 00 for little-endian “II”, or 4D 4D 00 2A for big-endian “MM”), with the sensor data and metadata stored in TIFF tags. Others are fully proprietary with a vendor-specific header. And the most literal meaning is literally raw: an unstructured dump of samples with no header whatsoever.
This is why raw developers do not rely on a signature. Instead they use the LibRaw and dcraw decoder libraries, which carry per-camera profiles: they identify the source camera (often from embedded metadata) and apply the correct rules for that model’s sensor layout, black level, and colour matrix. When you open a .raw in darktable, that per-camera intelligence, not a universal parser, is what makes the image appear.
Inside a camera raw: mosaic sensor data and the develop step
A camera raw file’s central content is the sensor readout itself. Camera sensors are monochrome; colour comes from a colour filter array laid over the pixels, most commonly a Bayer pattern (a repeating 2×2 tile of one red, two green, one blue filter) or Fujifilm’s X-Trans 6×6 pattern. So each raw pixel records the intensity of only one colour. The values are typically stored at 12 to 14 bits per pixel, far more tonal range than the 8 bits of a JPEG, which is what gives raw its latitude to recover blown highlights and lifted shadows.
What a camera .raw typically contains
├─ (optional) TIFF-style header some vendors; many have no standard header
├─ Raw sensor data undemosaiced Bayer / X-Trans mosaic, 12–14 bit
├─ EXIF / maker metadata camera, lens, exposure, white balance, timestamps
└─ Embedded JPEG preview a small ready-to-view thumbnail (not always present)
Because each pixel knows only one colour, a raw must be demosaiced: an algorithm interpolates the two missing colour channels at every pixel from its neighbours to build a full RGB image. That step, plus white balance, exposure, and tone adjustments, is the “development” a raw processor performs non-destructively before you export. The adjustments are stored as instructions, not baked into the pixels, so you can revisit them any time — the original sensor data is never overwritten. This is the whole reason to shoot raw rather than JPEG: the camera has not yet thrown away information by processing and compressing.
Developing a raw and exporting it
Windows and macOS do not decode most raws out of the box, so even a thumbnail needs help. On Windows, install Microsoft’s free Raw Image Extension from the Store so Explorer and Photos can show raw previews; macOS has broad built-in raw support in Photos and Preview. To actually edit, use a raw developer: the free, open-source darktable or RawTherapee (Windows, macOS, Linux) give Lightroom-style non-destructive editing, and Adobe Lightroom or Photoshop’s Camera Raw are the paid industry standard. IrfanView with its RAW plugin is a fast free viewer and batch converter.
Common conversions (all after developing the raw):
RAW → JPG universal, compressed, ready to share — keep the raw as your master
RAW → DNG Adobe's open, documented raw container, good for archiving
RAW → TIFF 16-bit lossless master for further editing in Photoshop/GIMP
RAW → PNG lossless web image (no EXIF, no layers)
Pointless: RAW → NEF / CR2 / ORF — you can't turn one camera's raw into another
brand's raw; they encode different sensors. For an open archive, use DNG.
DNG (Digital Negative) deserves a note: it is Adobe’s open, documented raw container, and the free Adobe DNG Converter ingests many camera raws, including various .raw files, and standardises them into one archival format with broad software support. Many photographers keep the original raw as the master and use DNG for long-term storage. What you cannot sensibly do is convert one vendor’s raw into another’s (.raw to NEF or CR2): those formats encode specific sensors and are not interchangeable.
Frequently asked questions
What program opens RAW files for free?
darktable and RawTherapee are free, open-source raw developers that open and develop most camera raws on Windows, macOS and Linux. IrfanView with its RAW plugin is a fast free viewer and batch converter. On Windows, also install the free Raw Image Extension so File Explorer shows thumbnails.
How do I convert a RAW file to JPG?
Open it in darktable, RawTherapee or IrfanView, adjust exposure and white balance, then Export or Save As JPEG. These tools batch-convert whole folders. Keep the original raw as your master, since the JPEG is processed and compressed.
Is .raw always a photo?
No. Besides camera images, .raw can be headerless PCM audio (open it in Audacity via Import Raw Data, supplying the sample rate and bit depth) or a raw disk/RAM image (.dd/.img) used in forensics and virtualization. Identify which kind you have before choosing a program.
References
- LibRaw — open raw decoding library and supported cameras
- Adobe — Digital Negative (DNG), the open raw format
- darktable — open-source raw developer
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.