Image tools

How to Convert an Image to Black and White (or Grayscale)

How to turn a photo into grayscale or pure black and white - why reds go dark in some apps, which conversion keeps colours as bright as they look, and how to clean up a scanned document or signature.

6 min readUpdated

"Black and white" means two different things. For a photo it usually means grayscale: every colour replaced by a shade of gray, so the picture keeps its light and shadow without the colour. For a scanned form, a signature or a logo it means exactly two colours: each pixel either black or white, with no gray in between. The two need different settings, and getting the first one right turns out to involve a choice most apps make silently for you.

The Black and White Image tool does both, in your browser. Here is what its options do, with real numbers.

Converting an image, step by step

  1. Drop a PNG, JPG or WebP onto the Black and White Image tool, or click to choose one. It is read on your device - nothing is uploaded.
  2. Choose Grayscale for a photo, or Pure black & white for a document, signature, stencil or line art.
  3. Pick the conversion - Natural is the default and the right choice for most photos - and adjust brightness and contrast if the result looks flat.
  4. In pure black and white, leave the threshold on automatic or drag it yourself - or turn on dithering to keep a photo's shading as a dot pattern.
  5. Choose PNG or JPG and download. The file is the full original size, whatever size the preview shows.

Why there is more than one way to make gray

A colour pixel stores three numbers from 0 to 255: red, green and blue. Grayscale needs one. The obvious recipe is to average the three, but the eye does not see them equally - green looks far brighter than blue at the same value - so averaging makes blue skies pale and foliage dark. Better recipes weight the channels, and the tool offers three:

  • Natural (luminance). The stored numbers are gamma-encoded, not proportional to light, so this first converts them to linear light, applies the Rec. 709 weights that sRGB is built on (21% red, 72% green, 7% blue), and converts back. Each colour keeps the brightness it appears to have.
  • Classic (Rec. 601 luma). The weights 0.299, 0.587 and 0.114 applied straight to the stored numbers. This is what JPEG, most image libraries and most "grayscale" buttons compute, so pick it to match another app. Its catch is that strong reds and blues come out darker than they look.
  • Average. (R + G + B) / 3, offered for when you want that particular look or need to match a tool that uses it.

A worked example: a red rose on green leaves

Take a rose petal of rgb(200, 30, 40) against a leaf of rgb(60, 140, 50). In colour the two are obviously different. Here is what each method turns them into, on the 0-255 gray scale:

  • Classic: the petal is 0.299 x 200 + 0.587 x 30 + 0.114 x 40 = 82, the leaf 0.299 x 60 + 0.587 x 140 + 0.114 x 50 = 106. The rose is darker than its leaves, 24 levels apart.
  • Average: the petal is 270 / 3 = 90 and the leaf 250 / 3 = 83. The order flips and the gap shrinks to 7 levels - the rose all but disappears into the foliage.
  • Natural: the petal is 102 and the leaf 123. Same order as Classic, but both brighter, because saturated colours are no longer pushed toward black.

The gap is widest on pure primaries. A pure red, rgb(255, 0, 0), becomes 127 with Natural but 76 with Classic; a pure blue becomes 76 and 29. If a red logo or a blue sky came out nearly black in another app, that is why.

Brightness and contrast

Removing colour can leave a photo flat, because areas that differed only in hue merge into one gray. Contrast fixes that by stretching the tones away from mid-gray: at +50 the slope doubles, so a gray of 100 drops to 72 and a gray of 160 rises to 192, while 128 stays where it is. Brightness shifts every tone up or down by the same amount. Both run from -100 to +100, and the preview updates as you drag.

Pure black and white: the threshold

In pure black and white the tool first makes the grayscale version, then compares each pixel against a threshold: anything at or above it turns white, anything below turns black. Raise the threshold and more of the picture goes black; lower it and more goes white.

By default the threshold is picked automatically with Otsu's method. The tool counts how many pixels sit at each gray level, then tries every possible cut and keeps the one that best separates the image into two groups - for a document, ink and paper. Transparent pixels are left out of the count, so an empty transparent margin cannot drag the cut. Suppose a phone scan of a signature has ink between 50 and 80 and paper between 190 and 215: every cut between 81 and 190 separates them equally well, and the tool takes the middle of that gap, 135, so slightly darker paper or slightly lighter ink still falls on the right side.

Dithering: shading with only two colours

A threshold on a photo throws away every in-between tone, leaving harsh black shapes. Dithering keeps them. It uses Floyd-Steinberg error diffusion: each pixel's rounding error is passed on to its undecided neighbours, so a 25% gray area becomes a field where about one dot in four is white. From a normal viewing distance the eye blends the dots back into gray. Because the overall tone is kept, there is no threshold to set; use brightness and contrast to make the result lighter or darker.

Use it for a retro-print look or a printer that can only lay down black; leave it off for documents, where it turns clean paper into noise. The preview of a large image is scaled down, so the dots in the downloaded file are finer than they look on screen.

Which format to save in

  • PNG is lossless and keeps transparency, so a signature on a transparent background stays transparent. For pure black and white it is usually the smaller file too.
  • JPG suits grayscale photos and keeps the file small. It cannot store transparency, so see-through areas become white, and its compression adds faint gray fringes around hard black edges - avoid it for pure black and white.
  • A JPG input stays JPG by default. If the result is still too heavy, run it through the Image Compressor.

If something looks wrong

  • A red or blue area went almost black. Switch from Classic to Natural.
  • The scanned page has a gray, speckled background. Use Pure black & white with dithering off; if specks remain, lower the threshold. If faint strokes vanish instead, raise it.
  • The image is sideways or needs a tighter frame. Fix it first with Rotate Image or Crop Image, then convert.

Convert your image now

Load a picture, choose grayscale or pure black and white, and download the result at full size. Open the Black and White Image tool - free, no sign-up, no watermark, and processed entirely in your own browser.

Frequently asked questions

How do I make a picture black and white without losing detail?
Use Grayscale rather than Pure black & white, choose the Natural conversion so colours keep their apparent brightness, and save as PNG. Grayscale keeps 256 shades, so tonal detail survives; PNG is lossless, so nothing is lost in saving. If the result looks flat, add a little contrast to separate tones that were only different in colour.
Why does my red text go nearly black in grayscale?
The common Rec. 601 formula weights red at only 0.299 of its stored value, so a pure red becomes a gray of 76 out of 255. The eye sees that red as much brighter. The Natural setting converts through linear light, which matches how bright colours appear, and turns the same red into 127, a mid-gray.
How do I clean up a scanned signature or document?
Choose Pure black & white with dithering off and leave the threshold on automatic - it finds the cut between ink and paper. If faint strokes disappear, raise the threshold; if the paper still shows gray patches, lower it. Save as PNG for the crispest edges and a small file.