Grayscale and black & white image converter
Convert any photo to perceptual greyscale or a pure 1-bit black and white image. Greyscale keeps the full range of grey tones, while black & white mode forces every pixel to either black or white for a crisp, high-contrast result — ideal for line art, scans, logos and stencil-style output.
How it works
The image is read into a <canvas> and every pixel is converted to a brightness
value using the perceptual luminance formula:
lum = 0.299R + 0.587G + 0.114B (ITU-R BT.601)
- Greyscale: each pixel’s red, green and blue are all set to
lum, keeping the full 0-255 range of shades. - Black & white: the luminance is compared against a threshold (default
128). If
lum ≥ thresholdthe pixel becomes white (255), otherwise black (0).
Example
A pixel with R=200, G=180, B=120 gives lum = 0.299×200 + 0.587×180 + 0.114×120 ≈ 179.
| Mode | Threshold | Output pixel |
|---|---|---|
| Greyscale | — | grey 179 |
| Black & white | 128 | white (179 ≥ 128) |
| Black & white | 200 | black (179 < 200) |
Everything runs in your browser — your image is never uploaded.