Skip to content

RAW vs JPEG: Choosing the Right Image Format

A long wooden fishing pier running out over calm water toward a bright orange and blue sunset sky
Photo: Fishing Pier At Sunset 1 by Duncan Rawlinson. 17mm, f/8, 1/30, ISO 200. A bright sunset sky above a darker pier and water, shot at 17mm, f/8, 1/30 s, ISO 200: in a scene with this much contrast the camera’s JPEG has to decide which tones to keep, while a RAW file leaves room to make that call later.

A JPEG is a finished picture: the camera has already chosen its colors, contrast, brightness and sharpness, then thrown away everything it did not use. A RAW file is the sensor’s recording before those choices are made, so you make them later on a computer or phone, with far more room to change your mind. Which one you should shoot depends on one question: do you want the camera to finish your photos, or do you want to finish them yourself?

This page shows what the camera does to make a JPEG, exactly which of those steps a RAW file leaves open and which it does not, where the extra latitude really comes from, and how to decide for your own shooting. Neither format is better in general. Each is the right answer to a different question.

What the camera does between the sensor and the JPEG

The easiest way to understand RAW is to follow the work the camera does every time you press the shutter in JPEG mode. It runs the same steps in the same order, every time, using whatever settings you chose in the menus:

  1. Record one color per photosite. Most sensors sit behind a Bayer filter, a grid of tiny red, green and blue filters, half of them green. Each photosite counts light of one color only. At this stage the image is not yet a color picture; it is a mosaic of single-color brightness readings.
  2. Build full color. Demosaicing estimates the two missing colors at every pixel from its neighbors.
  3. Set white balance. The camera scales the red, green and blue channels so that something it decides is neutral comes out neutral.
  4. Apply a tone curve and a picture style. The sensor’s readings are linear (twice the light, twice the number). The camera bends them into a curve that looks natural to the eye, adds contrast and saturation, and sets where white is. Anything brighter than that white point becomes pure white.
  5. Sharpen and reduce noise, by an amount the camera decides.
  6. Convert to 8 bits per channel, 256 levels each for red, green and blue.
  7. Compress with lossy JPEG compression and save. The sensor data is then discarded.

A RAW file is a snapshot taken partway down that line, after step 1. Your editing software, called a RAW converter, then runs steps 2 to 7 itself, with sliders instead of fixed settings. That is the whole idea: same steps, but you choose the settings after you see the result, and you can choose again tomorrow.

Two consequences follow. First, a RAW file has no single correct look. Every converter demosaics and renders it its own way, and the image you see is an interpretation. Second, a RAW file that has not been edited often looks flatter and duller than the camera’s JPEG, because the camera’s picture style has not been applied. That is not a weakness of the format, and why RAW files look different from the camera preview explains it step by step.

What RAW leaves open, and what it does not

The most common misunderstanding about RAW is that it lets you change anything after the fact. It does not. Everything that happens in light, in the lens and at the sensor is fixed the moment you take the picture, in both formats. Only the rendering is left open.

DecisionJPEGRAW
Framing, focus, depth of fieldFixed at captureFixed at capture
Shutter speed, so motion blur or frozen motionFixed at captureFixed at capture
Total light reaching the sensor (aperture and shutter)Fixed at captureFixed at capture
ISO amplification, and the noise that comes with itFixed at captureFixed at capture
Highlights already clipped in every channel at the sensorLostLost
White balanceBaked inOpen, no quality cost
Picture style, contrast, saturation, black and whiteBaked inOpen
Where white and black are set (highlight and shadow clipping by the rendering)Baked inOpen within the sensor’s limits
Sharpening and noise reductionBaked inOpen
Color space and output bit depthUsually sRGB, 8 bitsChosen at export

Keep this table in mind and most RAW versus JPEG arguments settle themselves. If your problem is a missed focus point, a blurred subject or a noisy high ISO frame, RAW will not save you. If your problem is a color cast, a sky the camera rendered too bright, or a style you no longer like, RAW gives you a second chance that a JPEG mostly does not.

Where the extra latitude in a RAW file comes from

People often say RAW “has more dynamic range“. The sensor sets the dynamic range, and it is the same whichever format you choose. What differs is how much of that range survives. A JPEG keeps only the slice between the black and white points its tone curve picked; a RAW file keeps the sensor’s full recording, so you can choose a different slice.

Highlight headroom

When the camera renders a JPEG, it usually places white a little below the point where the sensor itself saturates. Tones in that gap are pure white in the JPEG but still hold detail in the RAW file. That is why a highlights slider can bring back cloud texture in a RAW file that the JPEG shows as flat white. The gap is real but modest, commonly around a stop, more or less depending on the camera and the converter. Once a part of the image has saturated the sensor in all three channels, there is no data left in any format, and highlight recovery can only paint in a flat tone.

A vintage motel sign at dusk with a glowing red neon arrow and a blue neon triangle reading MOTEL
Photo: Pink Champagne Motel Neon Sign by Duncan Rawlinson. 70mm, f/2.8, 1/125, ISO 100. Saturated red and blue neon at 70mm, f/2.8, 1/125 s, ISO 100: in light this colored, one channel can reach its limit while the other two are far below it, so a bright color can clip and lose its texture before anything turns white.

Clipping is also not all or nothing. Saturated colors, such as a red neon tube or an orange sunset, often clip in one channel first. The JPEG shows that as a flat, featureless patch of color; the RAW file may still have detail in the other two channels for the converter to work with.

Shadow lifting and noise

Shadows are the other side. Lifting a dark area by two stops in a RAW file is usually clean on a modern camera, because the converter is working on data that was never squeezed into 8 bits. Lifting the same area in a JPEG quickly shows blotchy color and steps between tones. But the RAW is not unlimited either: shadows lifted three or four stops show the sensor’s noise, which no file format removes. The data was captured noisy, and RAW faithfully keeps the noise along with everything else.

If you want to see this slice of the range move rather than read about it, the interactive tool on the dynamic range page lets you set a scene’s brightness range against what a sensor records and watch which ends clip.

Or try it here: slide the exposure and watch which ends of the scene clip, then tick the box to lift the shadows as you would when editing, and see what comes up with them.

Bit depth: what the numbers really mean

Bit depth is how finely the file divides brightness, not how wide a range it holds. An 8-bit JPEG has 256 levels per channel, 256 × 256 × 256 = 16,777,216 possible colors. A 12-bit RAW has 4,096 levels per channel and a 14-bit RAW has 16,384, which is 16 and 64 times as many as the JPEG.

Those headline ratios overstate the practical difference, because the two files spread their levels very differently. RAW data is linear: half of all its levels describe the single brightest stop, a quarter describe the next stop, and so on down. A JPEG is gamma encoded, which spreads its 256 levels much more evenly across what the eye sees. Counting the levels in each stop below white (for the JPEG this counts the encoding alone; the camera’s tone curve decides which scene tones land in which stop):

Stop below white8-bit JPEG (sRGB)12-bit RAW (linear)14-bit RAW (linear)
1st (brightest)682,0488,192
2nd511,0244,096
3rd375122,048
4th292561,024
6th1664256
8th91664

Two things stand out. In the brighter stops a RAW file has tens of times the levels of a JPEG (about 30 times in the top stop of a 12-bit file, over 100 times in a 14-bit one), which is why heavy edits stay smooth there. In the deepest stops the advantage shrinks, and those few RAW levels are partly recording noise anyway. That is the honest version of “RAW has more data”: a great deal more where most of your picture lives, much less in the last stops of shadow.

Geese flying low over still water past a tree covered island, with pink morning fog fading into blue grey
Photo: Geese in Flight and Morning Fog by Duncan Rawlinson. 67mm, f/3.2, 1/1250, ISO 2500. A smooth pink to blue grey gradient through fog, 67mm, f/3.2, 1/1250 s, ISO 2500: smooth gradients like this are where banding shows first when an 8-bit file is pushed hard, and the 1/1250 s that froze the geese was fixed at capture in either format.

Where you see the difference is in smooth gradients: clear skies, fog, studio backdrops. Push a JPEG of a scene like this hard in contrast or color, and the gradient can break into visible stripes, called banding. The same edit on the RAW stays smooth, because there are many more levels between each visible step.

White balance: changing it in RAW versus correcting a JPEG

In a RAW file, white balance is a starting value stored alongside the data, not a change to the data itself. Change it in the converter and the converter simply runs step 3 again with new numbers, before the tone curve and before anything is clipped. The result is the same as if you had set that white balance in camera.

Correcting white balance on a JPEG is different. The camera has already applied its own white balance, then the curve, the clipping and the 8-bit conversion. Your correction is a second white balance on top of the first, working on bent and rounded numbers. Small corrections work well. Large ones, such as turning a tungsten-orange room shot with daylight white balance into neutral, tend to leave muddy colors, and any area clipped in the red channel by the first pass turns an odd cyan or grey when you pull red down.

A row of street lamps glowing through night fog along an empty paved path with a park bench in the foreground
Photo: Benches In The Fog by Duncan Rawlinson. 55mm, f/14, 5s, ISO 100. Street lamps in night fog, a 5 second exposure at 55mm, f/14, ISO 100: no single white balance is correct for this scene, and in a RAW file you can try a warmer or a cooler rendering of the lamps and fog later with no quality cost.

Mixed light, like street lamps in fog or a room lit by both a window and lamps, is where this matters most. There is no single correct answer, so it helps to be able to try several. To see how the camera’s white balance setting shifts the colors of a scene, try the interactive tool on the white balance page.

Setting white balance in a RAW converter works like the tool below: pick the light, then move the kelvin and tint until the whites look white.

What else is baked in, even when you shoot RAW

“Unprocessed sensor data” is a useful shorthand, but a few things are decided in a RAW file too:

  • ISO. The amplification happens before the data is recorded. Brightening a dark RAW file later is not the same as having used a higher ISO, and you cannot lower the ISO after the fact.
  • Compression. Many cameras offer uncompressed, losslessly compressed and lossy compressed RAW. Lossless files are smaller with no change to the data. Lossy RAW is smaller still and is invisible in most pictures, but can show faint artifacts in extreme edits.
  • Some in-camera processing. Some cameras apply lens corrections or noise reduction to the RAW data, especially at long exposures and high ISO.
  • Phone RAW. Many phones save a RAW file that has already been merged from several frames and already demosaiced. It still gives you open white balance and more tonal room than the phone’s JPEG or HEIF, but it is a different thing from a single-frame camera RAW. The mobile RAW workflow page covers what changes on a phone.

RAW formats themselves differ from one camera maker to the next, and your converter has to support your camera’s version. DNG is an open RAW format: some cameras and most phones record it directly, and other RAW files can be converted to it.

Your camera’s histogram is showing you the JPEG

Even if you shoot only RAW, the picture on the back of the camera, its histogram and its highlight warning are all drawn from a JPEG the camera makes from your RAW file using your current picture style and white balance. So the screen can flash a highlight as clipped when the RAW file still holds detail there. That is the hidden margin behind exposing to the right.

Two practical results follow. A neutral or low contrast picture style makes the preview and histogram closer to what the RAW file holds. And setting a black and white picture style while shooting RAW gives you a black and white preview, but the RAW file still opens in color in most converters, because the style is only an instruction.

File size, speed and storage

A RAW file is several times the size of a high quality JPEG of the same frame. You can estimate the uncompressed size of a RAW file yourself: megapixels × bit depth ÷ 8 gives megabytes. A 24 megapixel 14-bit file is 24 × 14 ÷ 8 = 42 MB before compression; lossless compression often makes the file noticeably smaller, by an amount that depends on the scene. Its JPEG is usually a fraction of that, depending on the scene’s detail and the quality setting.

The size shows up in three places. Bursts: the camera’s buffer fills sooner with RAW, so long bursts slow down earlier. Cards: at 42 MB per frame, a 64 GB card holds about 64,000 ÷ 42 ≈ 1,500 frames, against several times that many JPEGs. And storage: a year of RAW files needs real drives and a real backup plan.

JPEG has one size trap of its own. Each time you open a JPEG, edit it and save it again as a JPEG, the lossy compression runs again and a little more detail is lost. Editing in a non-destructive editor and exporting once from the original avoids that, whichever format you shoot.

How to choose for the way you shoot

Ask what you will do with the pictures, not which format is “professional”.

Shoot RAW when

  • The light is difficult. High contrast scenes, sunsets, backlit subjects, interiors with windows, and mixed or colored light all benefit from the open white balance and the highlight headroom.
  • You enjoy editing, or you know you will want a different look later.
  • The picture matters and cannot be repeated, and you will make prints or large edits from it.

Shoot JPEG when

  • You need pictures now. Sharing on the spot or delivering within minutes leaves no time to process.
  • You shoot very long bursts or thousands of frames, and buffer, card space and culling time matter more than latitude.
  • The light is easy and you like your camera’s look. A well exposed JPEG in good light is an excellent photo, and many camera styles are carefully tuned.
  • You will not edit. RAW files you never process give you large files and no benefit.

Or both

RAW+JPEG saves both files for every frame. It costs the most space and fills the buffer fastest, but it is a good way to learn: you get the camera’s look for quick sharing and the RAW file for the frames worth working on, and comparing the two side by side is one of the fastest ways to see what the camera’s processing does. Some cameras also offer HEIF, a 10-bit compressed format that keeps smoother gradients than JPEG in a similar size; the HEIF and HEIC page covers where it works and where it does not. For how all the formats compare, including TIFF and PNG, see the image file formats guide.

Decided on RAW and wondering what to do with the files? The photo editing workflow page walks through the steps from import to export.

Common mistakes with RAW and JPEG

  • Judging RAW by the unedited file. A flat, dull RAW is unrendered, not worse. Compare an edited RAW with the JPEG, or nothing.
  • Expecting RAW to fix exposure, focus or blur. It widens the margin for exposure, it does not remove it. Get exposure close in camera, and remember that focus, shutter speed and ISO are fixed in both formats.
  • Trusting the blinkies as the RAW’s limit. The camera’s warning is based on its JPEG. Learn by testing how far past the warning your own camera’s RAW files can be recovered.
  • Making big edits to JPEGs. Large white balance shifts, heavy shadow lifting and strong contrast are where JPEGs band and break. If you do this often, shoot RAW.
  • Re-saving JPEGs over and over. Each save loses a little more. Keep the original and export a new copy from it.
  • Shooting RAW with no backup. Bigger files mean bigger losses when a single drive fails. Keep more than one copy, in more than one place.

Try this: shoot one scene both ways and push it

This takes about ten minutes and teaches more than any table. Set your camera to RAW+JPEG (on a phone, turn on its RAW option and shoot a second frame in the normal mode). Find a scene with a bright sky and a shaded foreground, such as a street at sunset or a window from inside a room.

  1. Take one frame at normal exposure, one at one stop over (exposure compensation +1), and one at two stops under (exposure compensation minus 2).
  2. Note the file sizes of each RAW and JPEG pair.
  3. In any editor that opens RAW files, open the +1 pair. Pull highlights down as far as they go on both. Look at the brightest clouds or the window.
  4. Open the minus 2 pair. Raise exposure by two stops on both. Look at the darkest areas at 100 percent.
  5. Finally, set the white balance of both normal frames to the wrong extreme (very blue), then try to bring each back.

Judge it this way: where did the RAW recover detail the JPEG had lost, and where did both fail? If the RAW only won in places you rarely care about, JPEG may suit you. If it won in the frames that matter to you, you have your answer, from your own camera.

Want to check what stuck? The RAW vs JPEG quiz asks the questions this page answers.

Frequently asked questions about RAW and JPEG

Can I convert a JPEG to RAW or DNG to get the quality back?

No. You can wrap a JPEG in a DNG container or open it in a RAW editor, but the data the camera discarded is gone. Conversion only works one way: a RAW file can become a JPEG, never the reverse.

Is the JPEG from my camera worse than one I make from the RAW?

Not necessarily. Camera makers tune their color rendering carefully, and in good light a camera JPEG can match or beat a quick conversion. The RAW advantage is choice and latitude, not automatic quality.

Should I shoot 12-bit or 14-bit RAW?

If your camera offers both, 14-bit gives smoother tones in heavy edits and costs larger files and sometimes a slower burst rate. For most scenes the two look the same; the difference shows mostly in deep shadows pushed hard at low ISO.

Why does my RAW look different in different software?

Because a RAW file has no built-in look. Each program demosaics it and applies its own default curve and color profile, so the starting points differ even though the data is identical.

Does RAW let me change ISO later?

No. ISO is applied before the data is recorded, so its noise is part of the file. You can brighten a RAW file later, but that is an edit on top of the ISO you used, not a new ISO.

Curious how the camera turns those single-color readings into a full color picture in the first place? The demosaicing page explains it.

Want to know exactly what a RAW file contains and how it is stored? What is a RAW photo goes into the format itself.