Color to black & white
Convert colour images to Rec.709 grayscale or threshold them into pure black and white with an adjustable threshold; alpha is preserved.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Images are processed locally in your browser with Canvas and never uploaded.
Pick an image first (PNG / JPEG / WebP / GIF all work).
No result yet
Result
These are the real numbers from this run — copy them straight out.
Pick an image and the result shows up here.
What this tool does
- Turn colour photos into grayscale for printing or monochrome layouts so they do not smear on a black-and-white printer.
- Binarise scans: raise the threshold to drop light grey noise and keep only solid strokes for OCR.
- Build grey mask assets: convert to gray first, then threshold for a high-contrast mask.
Example
Input
A 2×2 image of [10,20,30,255], [40,50,60,255], [70,80,90,255] and [100,110,120,255] in grayscale mode
Output
[19,19,19,255], [49,49,49,255], [79,79,79,255], [109,109,109,255]
Grayscale uses Rec.709 weights 0.2126R + 0.7152G + 0.0722B; threshold writes 255 when luma ≥ threshold and 0 otherwise.
Frequently asked questions
What is the difference between grayscale and threshold?
Grayscale computes a 0–255 level from Rec.709 luma (0.2126R + 0.7152G + 0.0722B) and keeps every tonal step; threshold only compares against the cut-off, writing 255 when luma ≥ threshold and 0 otherwise, so the output holds pure black and white only. Use grayscale for printing or masks and threshold for cleaning up scans.
Which threshold should I pick, and is the default 128 fine?
The threshold runs from 0 to 255 and defaults to 128; it only applies in threshold mode. Raise it (150–180 is common) when the scan has grey background noise or faint text, and lower it if strokes break apart. In grayscale mode the slider does not change the output.
Will a transparent background be filled white, and is there a size limit?
Keep alpha is on by default, so transparent pixels stay transparent; only when you clear the checkbox is alpha forced to 255. The pixel limit is 16,000,000, and larger images stop with an error. The result is exported as a PNG whose file name carries the -gray suffix.
Keywords:grayscaleblack and whitedesaturatethreshold image