A RAW file is the closest thing a digital camera has to an undeveloped negative. It holds what the sensor measured, and a long list of decisions about what those measurements should look like has not been made yet. That is why a folder of CR2 or DNG files shows up as blank icons on a work laptop, why an upload form rejects them, and why two programs can open the same RAW file and show two different pictures.
It is also why "convert RAW to JPG" means two very different jobs. One is developing the sensor data into a new image. The other is pulling out a JPEG the camera already made and hid inside the file. This guide explains what is inside a RAW file, how CR2 and DNG differ, what each kind of conversion gives you, and how to tell which one you need. It sits under the image tools hub, next to the guides on HEIC vs JPG and TIFF files, whose structure CR2 and DNG borrow.
TL;DR: A camera RAW file (Canon CR2, Adobe DNG and others) stores unprocessed sensor data, usually at 12 or 14 bits per channel, plus a JPEG preview the camera rendered at capture time. Turning the sensor data into a photo means developing it (white balance, demosaicing, color and tone) in a RAW developer such as darktable, RawTherapee, Lightroom or Canon Digital Photo Professional. The Toolz CR2 to JPG and DNG to JPG converters do the other job: they extract that embedded preview, client-side, nothing uploaded, free, no signup, and tell you when the preview is smaller than the full image.
What is a camera RAW file?
A camera RAW file is an image file that stores the values an image sensor recorded, with minimal processing, together with the metadata needed to turn them into a picture later. It is not one format. Canon writes CR2 and CR3, Nikon writes NEF, Sony writes ARW, and Adobe's DNG is an open format written by many phones, drones, cameras and software.
The word "raw" is literal. A JPEG straight from the camera has already been through a processing pipeline in the camera: white balance applied, colors mapped to sRGB, contrast and sharpening added, noise reduced, and the result squeezed into 8 bits per channel with lossy compression. A RAW file stops before that pipeline runs. Every one of those choices is left open for you, or for your software, to make afterward.
Most RAW files also carry something that is easy to miss: one or more ready-made JPEG previews. The camera needs a displayable image for its rear screen and for quick browsing, so it renders one with the settings in effect when you pressed the shutter and stores it alongside the sensor data. That preview is the reason your camera can show you a RAW shot instantly, and it is what a lot of software shows you before any real development happens.
Why isn't RAW sensor data a photo yet?
RAW sensor data is not a photo because it lacks the decisions that turn measurements into colors: it has no white balance applied, no full-color pixels, no color space, and no tone curve. Software has to supply all four before there is anything to look at.
Take the pixels first. Almost every camera sensor sits behind a color filter array, usually a Bayer pattern, in which each photosite sees only red, green or blue light, with twice as many green sites as red or blue. So a 24-megapixel RAW file does not hold 24 million colors. It holds 24 million single brightness readings, each behind one colored filter. Rebuilding a full red, green and blue value for every pixel from its neighbors is called demosaicing, and different algorithms produce visibly different detail and artifacts.
Then the rest of the pipeline:
- Black level and white level. The raw numbers have an offset and a ceiling specific to the sensor, which must be subtracted and scaled.
- White balance. The sensor records light as it was. Deciding that a tungsten-lit wall is white rather than orange is a choice, applied as a multiplier per channel.
- Demosaicing. Interpolating the missing two colors at every photosite.
- Color conversion. A camera-specific matrix maps sensor colors to a standard space such as sRGB or Adobe RGB.
- Tone curve and gamma. Sensor data is linear, which looks dark and flat on screen; a curve maps it to how we perceive brightness.
- Sharpening, noise reduction, lens corrections. Optional, but every camera JPEG includes some.
- Output. Reduce to 8 bits per channel and encode as JPEG, or keep 16 bits in a TIFF.
Each step involves judgment, which is the whole point of shooting RAW. It is also why a RAW file cannot simply be "opened" like a JPG: there is no single correct picture inside it until someone chooses how to develop it.
RAW vs JPG: what do you gain and lose?
RAW gives you more recorded data and more room to fix a shot later; JPG gives you a finished, small file that opens anywhere. The difference comes down to bit depth and to when the decisions are made.
| RAW (CR2, DNG) | JPG | |
|---|---|---|
| Contents | Sensor readings plus an embedded JPEG preview | A finished, rendered image |
| Bit depth | Usually 12 or 14 bits per channel (4,096 or 16,384 levels) | 8 bits per channel (256 levels) |
| White balance | Decided later, without loss | Baked in; correcting it degrades the image |
| Highlight and shadow recovery | Often a stop or more of headroom | Clipped detail is gone |
| Compression | Uncompressed or lossless, sometimes lossy in newer formats | Lossy |
| Typical size | Tens of megabytes | A few megabytes |
| Opens in | RAW developers, some system viewers | Almost everything |
| Best for | Editing, archiving the original capture | Sharing, uploading, printing at home |
The bit depth row is where most of the editing freedom lives. A 14-bit channel has 64 times as many levels as an 8-bit one, so pulling up a dark shadow in a RAW file stretches real recorded gradations, while doing the same to a JPG stretches 256 levels into visible banding and noise.
What is a CR2 file?
A CR2 file is Canon's RAW format for EOS cameras from 2004 until Canon began moving to CR3 in 2018. It is built on the TIFF structure: the file opens with the same II little-endian header and the number 42, followed by the letters CR and a major version of 2 at byte 8, which is how software tells a CR2 apart from an ordinary TIFF.
Inside, a CR2 chains several image directories. One holds a JPEG preview, one a tiny thumbnail, and one the sensor data itself. The sensor data is stored as lossless JPEG, the rarely used lossless process from ITU-T T.81, the same standard that defines ordinary JPEG. That detail causes a common confusion: a CR2 contains more than one "JPEG", but only the preview and thumbnail are ordinary JPEGs a browser can draw. The lossless one is raw Bayer data that no image viewer can display directly.
The preview size varies by camera, and it matters for anything that extracts it. In this project's tests, a Canon EOS 20D CR2 gave a 1536 x 1024 embedded preview while its sensor image is 3504 x 2336, under a fifth of the pixels. A Canon EOS 5D Mark IV CR2 gave a full 6720 x 4480 preview, the same size as the sensor image. Later Canon DSLRs generally store a full-size preview; older and smaller models are less predictable.
Canon's newer bodies write CR3, which uses a different container. The CR2 tools here do not read CR3, and a CR3 dropped on the CR2 page is turned away with a message.
What is a DNG file?
A DNG file is a RAW image in Adobe's Digital Negative format, an openly documented format introduced in 2004 so RAW files would not depend on one camera maker's software. The DNG specification is public and free to implement, and it builds on the TIFF/EP standard (ISO 12234-2), so a DNG also opens with a TIFF header. Software tells it apart by a DNGVersion tag in its first directory.
Because it is open, DNG comes from a wide mix of devices:
- iPhone Pro models save Apple ProRAW as DNG.
- Google Pixel and many other Android phones save DNG in RAW mode.
- Many drones record DNG stills.
- Some cameras, including several Leica and Pentax models, offer DNG as their RAW format.
- Adobe DNG Converter and Lightroom write DNG from other RAW formats.
That variety shows up in the previews. A DNG from a dedicated camera, or one written with a full-size preview, gives you a full-resolution JPEG. Phones often embed a much smaller one. In this project's tests, a Pixel 4a DNG carried only a 672 x 504 preview for a 4032 x 3024 photo, one-sixth of the width and one thirty-sixth of the pixels, while an iPhone 12 Pro DNG carried a full 3024 x 4032 preview.
DNG also allows sensor data in two shapes. Most DNGs hold color filter array data, the Bayer mosaic described above. Some, including Apple ProRAW, hold linear RGB data that has already been demosaiced but not yet white-balanced or tone-mapped. Both still need developing before they look like a finished photo.
CR2 vs DNG: how do they compare?
CR2 is a closed, Canon-only format from a fixed set of cameras; DNG is an open format written by many devices, which makes its contents far less predictable.
| CR2 | DNG | |
|---|---|---|
| Owner | Canon, undocumented publicly | Adobe, public specification |
| Written by | Canon EOS cameras from 2004, replaced by CR3 from 2018 | Phones, drones, some cameras, Adobe software |
| Structure | TIFF-based, CR marker at byte 8 |
TIFF/EP-based, DNGVersion tag |
| Sensor data | Lossless JPEG Bayer data | Bayer or linear RGB, several compressions |
| Embedded preview | Almost always present; full size on most later DSLRs | Optional; size set by the writer, often small on phones |
| Successor | CR3 | Newer DNG versions |
| Long-term readability | Depends on software continuing to support it | Documented, so easier to support |
The last row is the argument archivists make for DNG. A documented format can be read by software written decades from now; an undocumented one survives as long as someone keeps reverse-engineering it. That is why Adobe DNG Converter exists and why some photographers convert their CR2 archives to DNG.
Extracting the preview vs developing the RAW: which do you need?
Extract the embedded preview when you want the camera's own rendering quickly, for proofing, sharing or browsing. Develop the RAW when you need full resolution from a small-preview file, different white balance, recovered highlights, or noise reduction.
| You want to | Use | Why |
|---|---|---|
| Send proofs right after a shoot | Preview extraction | The camera look is already applied and it takes moments |
| Open a few CR2s on a machine without Canon software | Preview extraction | No install, no catalog import |
| Skim an old archive to find the keepers | Preview extraction | Fast, then develop only the selects |
| Fix a wrong white balance | RAW developer | The preview has the wrong balance baked in |
| Recover blown highlights or lift deep shadows | RAW developer | Only the sensor data has the extra range |
| Get full resolution from a phone DNG | RAW developer | The preview may be a fraction of the size |
| Export the edits you made in Lightroom | Lightroom | Edits live in a catalog or sidecar, not the RAW file |
For developing, the common choices are darktable and RawTherapee, both free and open source, Adobe Lightroom, and Canon's free Digital Photo Professional for Canon files. All of them read CR2 and DNG, apply the pipeline described earlier, and export a JPG or 16-bit TIFF.
How do the Toolz RAW converters work?
The Toolz converters open the RAW file's TIFF directories, find every embedded JPEG a browser can decode, pick the largest, turn it upright and save it as a JPG. They do not develop the sensor data, and every result says so.
Step by step, when you drop a file on the CR2 to JPG converter or the DNG to JPG converter:
- Identify the file by its bytes. The
CRmarker or theDNGVersiontag decides the format, not the extension. A CR3, NEF or ordinary TIFF is pointed to the right page. - Walk the directories. Every directory, including sub-directories, is checked for an embedded JPEG. Only JPEGs a browser's decoder handles (baseline, extended and progressive) count, which rules out the lossless JPEG sensor data in a CR2.
- Pick the largest preview and read the sensor dimensions, so the two can be compared.
- Apply orientation. Portrait shots are turned upright using the orientation in the RAW file, or the one inside the preview itself when it has its own, as iPhone ProRAW previews do.
- Encode the JPG at the Quality setting, which runs from 10 to 100 and starts at 90.
The note under each result is the important part. It reads, for the EOS 20D file above: "This is the JPEG preview the camera saved inside the CR2 file, not a new development of the RAW sensor data. The preview is 1536x1024, smaller than the 3504x2336 full image." When the preview is full size, only the first sentence appears. You always know which of the two you got.
Why not develop the RAW data in the browser? The best open RAW decoder, LibRaw, does have a WebAssembly build, but that build needs the page to be cross-origin isolated, a security mode that browsers require before they allow the shared memory multithreaded WebAssembly uses. That mode restricts what a page can load from other origins, and this site does not run in it. Extracting the preview works with nothing but the browser's own JPEG decoder, and nearly every CR2 and most DNGs carry a usable one.
If you want a format other than JPG, the Image Converter accepts CR2 and DNG as well and writes PNG, WebP, PDF and more from the same embedded preview. The same idea applies to Photoshop files: the PSD to PNG converter reads the flattened composite image Photoshop stores inside the PSD rather than rebuilding each layer, much as the RAW converters read the camera's rendering rather than the sensor data.
What gets lost when you extract a RAW preview?
Extracting the preview keeps the camera's rendering and drops everything a RAW developer would have used: the extra bit depth, the adjustable white balance, the highlight headroom, and the metadata.
- Editing latitude. The preview is an 8-bit JPEG. Blown highlights stay blown and a wrong white balance stays wrong.
- Resolution, sometimes. Full size on most later Canon DSLRs and on files written with a full-size preview; small on many phone and drone DNGs.
- Your later edits. RAW editors store adjustments in a catalog or sidecar file, not in the RAW file, so the preview shows the shot as captured.
- EXIF and GPS. The JPG is written from decoded pixels, so the capture date, lens and exposure details and any GPS location are not copied. That can be a privacy win when sharing drone or phone photos.
- A little quality. The preview is decoded and re-encoded once. At 90 the difference is hard to see.
The original RAW file is untouched, so none of this is permanent. Keep the RAW, and develop it properly when a shot deserves it.
Why won't my RAW file convert?
A RAW file fails to convert for one of four reasons: it has no browser-decodable preview, it is a RAW format the page does not read, it exceeds a size limit, or it is damaged.
| Message or symptom | Cause | What to do |
|---|---|---|
| "has no embedded JPEG preview that a browser can open" | The writer stored no preview, or only one in a format browsers cannot decode | Develop the file in a RAW developer and export a JPG |
| Turned away as CR3, NEF, ARW | Not a CR2 or DNG | Use the camera maker's software, or Adobe DNG Converter to make a DNG first |
| JPG much smaller than expected | Small embedded preview, common on phones | Read the note; develop the RAW for full size |
| "Files over 200 MB are refused" | Very large RAW or DNG | Develop it in desktop software |
| "larger than 100 megapixels" | Preview above the browser-safe limit | Develop it in desktop software |
| "could not be read" | Truncated copy or card error | Copy the file from the card again |
One practical trick for other RAW formats: Adobe DNG Converter, which is free, can turn NEF, ARW, CR3 and many others into DNG, and its preferences let you choose a full-size JPEG preview. A DNG written that way converts at full resolution on the DNG page.
Frequently asked questions
What is a RAW file in photography?
A RAW file stores the unprocessed readings from a camera's image sensor, usually at 12 or 14 bits per channel, along with metadata and an embedded JPEG preview. It has to be developed in software before it becomes a finished photo.
Why can't I open CR2 or DNG files?
Many apps, browsers and upload forms cannot develop RAW sensor data, so they show a blank icon or refuse the file. A RAW developer can open it, or you can extract the embedded JPEG preview to get a viewable image.
Is converting CR2 to JPG the same as developing the RAW file?
Not on Toolz. The CR2 and DNG converters extract the JPEG preview the camera embedded at capture time, with the white balance and style set then. Developing means processing the sensor data in a RAW developer such as darktable, RawTherapee, Lightroom or Canon Digital Photo Professional.
Why is the JPG from my DNG so small?
The DNG only carries a small embedded preview. Phones often embed one far below the photo's resolution; a Pixel 4a DNG in testing held a 672 x 504 preview for a 4032 x 3024 photo.
What is the difference between CR2 and DNG?
CR2 is Canon's proprietary RAW format for EOS cameras before CR3. DNG is Adobe's openly documented RAW format, written by phones, drones, some cameras and Adobe software, and its embedded preview size varies by device.
Should I shoot RAW or JPG?
Shoot RAW when you plan to edit and want room to fix exposure and white balance later. Shoot JPG, or RAW plus JPG, when you need finished images immediately and small files matter more than editing latitude.
Are my RAW photos uploaded when I convert them on Toolz?
No. The CR2 and DNG converters read the file and write the JPG client-side in your browser, so the photos never leave your device.



