Image Threshold (Black & White)
Convert any image to pure black and white — adjustable threshold, Otsu's auto method, and Floyd-Steinberg dithering
Turn any image into pure black and white by setting a brightness cutoff — pixels above it go white, pixels below go black. Adjust the slider for manual control, or let Otsu's auto-threshold pick the best split from your image's histogram. Floyd-Steinberg dithering is there when you need gradients to survive the conversion.
And everything runs in your browser. Nothing gets uploaded.
How It Works
Every pixel in your image has a brightness value between 0 (pure black) and 255 (pure white). The tool measures each pixel’s luminance using a weighted formula — red × 0.2126, green × 0.7152, blue × 0.0722 — then compares it to your chosen threshold. Above the line? White. Below? Black. That’s it. If you turn on dithering, the tool spreads rounding errors to neighboring pixels so gradients don’t vanish entirely.
Examples
Cleaning Up a Whiteboard Photo
You snapped a photo of meeting notes on a whiteboard. The lighting is uneven, there are shadows from your hand, and the markers look gray instead of black.
Whiteboard photo with gray markers, uneven lighting, visible shadows — 4032×3024 px
Clean black text on pure white background — threshold 180, no dithering
Making a Logo Print-Ready
A client sent their logo as a low-quality JPEG with anti-aliased edges. You need a crisp 1-bit version for a rubber stamp order.
JPEG logo with fuzzy gray edges, 800×400 px, 95 KB
Sharp black logo on white, threshold 140, PNG 12 KB
Creating a Halftone Effect for a Poster
You want that retro newspaper-print look on a portrait photo for a screen-printed poster. Plain thresholding wipes out too much detail in the face, but dithering keeps the shading intact.
Portrait photo, soft lighting, lots of mid-tones — 2400×3000 px JPEG
Floyd-Steinberg dithered result, threshold 120, facial detail preserved through dot patterns
Who Uses This
Prep logos and illustrations for single-color printing, engraving, or vinyl cutting.
Clean up scanned textbook pages and handwritten notes so OCR software can actually read them.
Generate binary masks for computer vision pipelines, barcode readers, or QR code preprocessing.
Convert customer artwork to 1-bit files for screen printing, rubber stamps, and laser engraving.
Common Mistakes
128 is just the midpoint — it’s not magic. A dark photo might need 80, a bright scan might need 190. Click Auto Threshold first, then adjust from there.
Plain thresholding turns smooth gradients into harsh blocks. If your image has skin tones, skies, or shadows that matter, turn on dithering. The dot pattern preserves detail that hard cutoffs destroy.
The histogram shows you where your pixels actually cluster. If most brightness values pile up on one side, you’ll know why half the image disappeared. Read the graph before you blame the tool.
Technical Details
- Processing: 100% client-side — images never leave your browser
- Supported Formats: JPG, PNG, WebP, BMP, GIF, SVG
- Max Resolution: Limited only by your device’s available memory
- Luminance Formula: ITU-R BT.709 (0.2126R + 0.7152G + 0.0722B)
- Auto Threshold: Otsu’s method (maximizes between-class variance)
- Dithering: Floyd-Steinberg error diffusion
- Browser Support: Chrome, Firefox, Safari, Edge
Frequently Asked Questions
What is image thresholding?
It’s a way of converting any image into pure black and white. Each pixel gets measured for brightness, and if it’s above your chosen number it turns white — below it, black. No gray left. People use it for document scanning, barcode reading, OCR prep, and anywhere you need a hard separation between foreground and background.
What does Otsu’s method do?
Otsu’s method looks at the brightness histogram of your image and finds the threshold value that best separates the dark pixels from the light ones. It tests all 256 possible cutoff points and picks the one that maximizes the difference between the two groups. Works great when your image has two distinct brightness clusters — like dark text on a light page.
When should I use dithering vs plain threshold?
Plain threshold is perfect for text, logos, and high-contrast images where you want crisp edges. Use dithering when your source has gradients, shadows, or skin tones — the dot pattern fakes gray shades using only black and white pixels. Think newspaper photos. If the image looks blocky and harsh without dithering, that’s your sign to turn it on.
Is there a difference between threshold and grayscale?
Yes, big difference. Grayscale keeps all 256 shades of gray — you still see smooth gradients and subtle tonal changes. Thresholding crushes everything down to just two values: black or white. No in-between. A grayscale image has nuance; a thresholded one is binary.
What threshold value should I pick?
Depends entirely on the image. Dark photos often need a threshold around 70–100. Bright scans of text on paper work best around 160–200. If you’re unsure, start with Auto Threshold — it’ll give you Otsu’s best guess, and you can drag the slider from there until the preview looks right.