Image Threshold / Binarize

Convert an image to pure black & white at a chosen threshold.

Open tool

Overview

The Image Threshold / Binarize tool converts an uploaded photo or graphic into a pure black-and-white image using a user-chosen luminance cutoff. Pixels brighter than the threshold become white, pixels darker become black, and nothing in between survives. Drop in any picture and the tool returns a 1-bit-feeling silhouette.

This is the standard pre-processing step for OCR pipelines, barcode and QR readers, blueprint generation, and stencil cutting on plotters or laser engravers. It is also a favourite stylistic effect for high-contrast posters, screen-print preparations, and dramatic social cards where you want to convert a photo to pure black and white online.

How it works

The image is first converted to a single-channel grayscale using Rec. 709 luminance weights (0.2126 R + 0.7152 G + 0.0722 B). Every grayscale value is then compared against the threshold: values above become 255 (white), values at or below become 0 (black). The result is a binary mask written either as a 24-bit PNG with only two colours, or as a true 1-bit PNG for storage efficiency.

For images where a single global threshold would either lose detail in shadow or blow out highlights, advanced workflows turn to adaptive (Otsu, Niblack) thresholds that compute a different cutoff per region. The global threshold remains the right pick for clean scans of text, line art and high-contrast objects.

Examples

Before: handwriting-scan.jpg (mid-grey paper, dark ink)
After:  Threshold 128 → clean black text on white background, OCR-ready.

Before: portrait.jpg
After:  Threshold 110 → high-contrast silhouette suitable for a stencil.

Before: x-ray.png (16-bit grayscale)
After:  Threshold 180 → bone structure isolated, soft tissue dropped.

FAQ

What threshold should I use?

For scanned text on white paper, 180-200 isolates ink cleanly. For photographic silhouettes start at 128 (the midpoint) and adjust until the subject reads as a clean shape.

Will the output be smaller?

Yes — a 1-bit PNG with only two unique colours compresses to a fraction of its 24-bit equivalent. Some encoders auto-detect this and pick the smallest palette automatically.

Does it support adaptive thresholding?

This tool offers a global threshold. For pages with uneven lighting, run a brightness-normalising step first or use an adaptive algorithm in a dedicated vision library.

What happens to colour?

Colour information is discarded after the grayscale conversion. The output is purely black and white.

Is the alpha channel preserved?

Yes — transparent pixels stay transparent and only the visible content is thresholded. Useful for masking out a logo against a complex background.

Try Image Threshold / Binarize

An unhandled error has occurred. Reload ×