Skip to content

Black and White Photo Converter

Convert a local JPG, PNG, or WebP to a full-resolution grayscale PNG with a documented W3C channel matrix.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Choose a local JPG, PNG, or WebP within the file and pixel limits.
  2. 2.Select Convert to black and white and wait for the per-pixel canvas transform.
  3. 3.Verify the dimensions and appearance, then download the grayscale PNG.

About Black and White Photo Converter

Black and White Photo Converter turns a local color image into a grayscale PNG without uploading it. Select a JPG, PNG, or WebP, run the conversion, and download an image with the same decoded width and height.

Each output pixel uses the W3C Filter Effects grayscale weights: red 0.2126, green 0.7152, and blue 0.0722. The weighted value is rounded to the nearest 8-bit integer and written to all three color channels. Alpha is copied unchanged, so transparent and partially transparent pixels retain their opacity.

Eight external fixtures cover black, white, neutral gray, the three RGB primaries, yellow, and cyan. They pin the exact matrix and rounding behavior, including red to 54, green to 182, and blue to 18. This is deterministic browser pixel processing rather than an unspecified CSS preview filter.

Input follows the shared image safety policy: JPG, PNG, or WebP up to 25 MiB with bounded decoded dimensions. The browser decodes the file, draws it once to canvas, reads a bounded RGBA buffer, transforms complete pixels, writes the buffer back, and encodes PNG. Invalid files, excessive dimensions, incomplete pixel data, missing canvas support, and empty output fail visibly.

The output is grayscale, not a one-bit threshold, halftone, duotone, film emulation, selective-color edit, or perceptually optimized artistic grade. The chosen matrix operates on the browser's decoded 8-bit channel values. Color profiles, HDR metadata, wide-gamut precision, and print-specific black generation are not preserved as a professional color workflow.

Everything stays in the current browser tab, and temporary Object URLs are revoked when replaced or unmounted. Use this tool for quick web graphics, documents, references, or simple monochrome assets. For color-managed printing, RAW development, local contrast control, batch editing, or non-destructive layers, use a dedicated image editor.

Methodology & sources

Validate a bounded local image and decoded pixel budget, draw it to a same-size canvas, read complete RGBA pixel data, compute round(0.2126R + 0.7152G + 0.0722B) for each pixel, assign that value to R/G/B while retaining alpha, write the transformed buffer back, encode PNG, reject empty output, invalidate stale jobs, and revoke replaced Object URLs.

Frequently asked questions

Which grayscale formula is used?
The tool uses the W3C weights 0.2126 red, 0.7152 green, and 0.0722 blue, rounded per pixel.
Is transparency preserved?
Yes. RGB channels become gray while each pixel's alpha channel is left unchanged.
Is this the same as pure black and white thresholding?
No. It creates many gray levels rather than only black or white pixels.
Is the image uploaded?
No. Decode, pixel transformation, PNG encoding, and download creation run locally.

Image Tools guides

View all