Saved

Press the star next to a tool's name to save it.

All my tools

JPG to RAW Converter

Use this JPG to RAW converter to turn JPG images into headerless .raw files of 8-bit RGB pixel data, named with their width and height. Note it can't create camera RAW sensor files.

Your images are converted on your device. Nothing is uploaded.

RAW files

Choose JPG images to convert them to raw RGB.

This JPG to RAW converter turns a JPG into a .raw file of plain pixel data: every pixel's red, green and blue values, one byte each, row by row, with no header. It's the format some image editors, scientific tools, games and embedded displays import as raw RGB. The JPG to RAW converter works in your browser and names each file with its width and height, because a raw file can't store them itself.

How to use the JPG to RAW converter

  1. Choose JPG images or drop them on the box. Up to 30 files, 50 MB each.
  2. Wait a moment while each picture is converted to raw RGB on your device.
  3. Download each file, or all of them in one .zip.

This isn't camera RAW

Camera raw files, the RAW setting on DSLRs and many phones, contain unprocessed data straight from the camera's sensor, often called a digital negative. They keep the sensor's full measurements of light, with a wider dynamic range than the finished photo, so they can be developed many times with different adjustments. There are dozens of camera raw formats from different manufacturers. A JPG has already been developed and compressed, so that sensor data is gone and no converter can recreate it. This tool makes the other kind of raw file: uncompressed pixel values.

About JPG

JPEG, short for Joint Photographic Experts Group, is the most widely used method of compressing digital photos. It's lossy: it throws away detail the eye is less likely to notice, and the degree of compression can be adjusted, trading file size for quality. JPEG typically compresses about 10:1 with a perceptible but widely accepted loss. Files usually end in .jpg or .jpeg. Because the detail is already gone, converting a JPG to another format can't bring it back; it changes how the same pixels are stored.

What's in the file

The file holds 3 bytes per pixel in the order red, green, blue, starting at the top-left pixel and running across each row, then down. There's no header, palette or colour profile: byte 0 is the first pixel's red value and the file ends with the last pixel's blue value. So the file size is exactly width × height × 3 bytes. To open it, a program needs to be told the width, height, number of channels (3), bit depth (8 bits) and interleaved order, which is why the file name includes the size, for example photo_800x600_rgb.raw.

Worked example

Say you need the raw pixels of an 800 × 600 JPG for a microcontroller display. Choose the file and the converter writes photo_800x600_rgb.raw, exactly 800 × 600 × 3 = 1,440,000 bytes. In your program or editor, import it as raw data with width 800, height 600, 3 channels, 8 bits per channel and interleaved RGB order. If the picture looks skewed or striped, the width is wrong; if the colours look odd, check the channel order.

File size

Raw RGB is uncompressed, so it's usually far bigger than the JPG it came from: a 1,920 × 1,080 image is 6,220,800 bytes, about 6.2 MB, and a 12-megapixel photo about 36 MB. If you need lossless pixels in a format most programs open automatically, PNG or TIFF is easier because they record the size and colour information themselves.

Converting several images at once

You can choose up to 30 JPG files in one go, up to 50 MB each. They're converted one after another on your own computer or phone, using its memory and processor, so nothing is sent to a server and the pictures stay private. Each result appears in the list with its new size as soon as it's ready, and the Download all button saves every file in a single .zip, because browsers often block several downloads at once. Very large photos take longer and need more memory, so on an older phone convert big batches a few at a time.

Where raw RGB files are used

Raw pixel files are handy wherever a program wants the bare numbers and already knows the image size: loading a picture into a microcontroller or LED display, feeding test images to image-processing code, importing textures into some game tools, or comparing pixel values between programs. Because there's no header to parse, reading the file is as simple as stepping through it three bytes at a time, one pixel after another.

Common mistakes

  • Expecting camera RAW. A JPG can't become a sensor raw file for Lightroom or a camera raw editor.
  • Losing the dimensions. Keep the size in the file name, because the file doesn't store it.
  • Importing with the wrong channel count. These files have 3 channels, not 4.
  • Using raw files for sharing. Most programs can't open them without settings.

Tips

  • Resize the JPG to the exact size your device or program expects before converting.
  • Check the byte count of the downloaded file: it should equal width × height × 3 exactly.
  • Use PNG or TIFF when you only need a lossless copy.

What next

Use this often? Add JPG to RAW to your Home screen.

Frequently asked questions

Can this JPG to RAW converter make a camera RAW file?

No. Camera raw files hold unprocessed sensor data that a JPG no longer contains. This converter makes a raw RGB pixel file instead.

What's inside the .raw file?

Three bytes per pixel, red, green and blue, row by row from the top-left, with no header. The size is width × height × 3 bytes.

How do I open the raw file?

Import it as raw data with the width and height from the file name, 3 channels, 8 bits per channel and interleaved RGB order.

Why is the file name so long?

It includes the width and height, for example photo_800x600_rgb.raw, because the raw file can't store them.

Is the JPG to RAW converter free?

Yes. It runs in your browser and nothing is uploaded.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Image Tools