PNG Grayscale Checker

Scans every pixel of an uploaded PNG in your browser and checks whether it's genuinely grayscale (every pixel's red, green, and blue values are equal), reporting how many pixels contain actual color if it isn't. Nothing is uploaded to a server. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

A PNG can be saved in a color mode but still contain no actual color at all — this tool checks the real pixel values to answer whether an image is truly grayscale.

It scans the decoded image locally in your browser; nothing is uploaded anywhere.

What Is PNG Grayscale Checker?

A pixel-level grayscale detector that compares each pixel's red, green, and blue values and reports whether every pixel in the image matches (making it grayscale), or how many don't.

It reports both the raw count of non-grayscale pixels and their percentage of the total image.

How PNG Grayscale Checker Works

After the uploaded PNG is decoded into an RGBA pixel buffer, a pure lib function loops over every pixel and checks whether its red, green, and blue byte values are all equal.

Any pixel where they differ is counted as a 'color pixel'; the image is reported grayscale only when that count is exactly zero.

When To Use PNG Grayscale Checker

Use it to confirm an image exported or converted to grayscale genuinely contains no color, rather than trusting an editor's mode label.

It's also useful for catching a small colored artifact (like a stray watermark or a compression color fringe) hiding in an otherwise black-and-white image.

Often used alongside PNG Color Count Finder and PNG Analyzer.

Features

Advantages

  • Checks real pixel values instead of relying on the file's declared PNG color type.
  • Reports exactly how much of the image contains color when it isn't fully grayscale, not just a yes/no answer.
  • Runs entirely client-side, so the image is never uploaded anywhere.

Limitations

  • Requires an exact R === G === B match per pixel; heavy JPEG-style compression artifacts (not applicable to lossless PNG, but relevant if a PNG was re-derived from a lossy source) could introduce tiny channel differences that register as 'not grayscale' even though the image looks black and white.
  • Doesn't distinguish grayscale from sepia or other tinted monochrome looks — a sepia-toned image has R, G, B values that differ slightly by design and will correctly report as non-grayscale.

Examples

True black-and-white scan

Input

A 1000x1400 PNG of a scanned document, saved as RGB

Output

isGrayscale: true, colorPixels: 0

Even though the file is RGB-mode, every pixel's R, G, and B values match, so it reports as genuinely grayscale.

Grayscale photo with a colored logo watermark

Input

A grayscale photo with a small red logo overlay

Output

isGrayscale: false, colorPixels: 1,240 (0.3% of image)

The low color-pixel percentage pinpoints a small colored region rather than a fully colored image.

Best Practices & Notes

Best Practices

  • Run this after a 'convert to grayscale' step to confirm it fully succeeded, especially after resizing or format conversion which can reintroduce color via anti-aliasing.
  • If colorPercent is very low but nonzero, look for a small overlay, watermark, or compression artifact rather than assuming the whole conversion failed.

Developer Notes

The grayscale scan is a pure function over a plain Uint8ClampedArray pixel buffer that compares three byte values per pixel, fully unit-tested without any canvas dependency; only decoding the upload into that buffer happens in the browser-only component.

PNG Grayscale Checker Use Cases

  • Verifying a grayscale conversion step fully removed color from every pixel
  • Detecting a small colored watermark or artifact hidden in a mostly black-and-white image
  • Auditing a batch of scanned documents for accidental color contamination

Common Mistakes

  • Trusting a PNG's declared color type (grayscale vs. RGB) as proof of its actual pixel content — many grayscale-looking images are technically saved in RGB mode.
  • Assuming a nonzero colorPixels count means the whole image looks colored; a tiny percentage often points to a small localized artifact instead.

Tips

  • If colorPercent is unexpectedly nonzero after a grayscale conversion, check the image's edges and corners first — anti-aliasing against a colored background is a common cause.
  • Combine with the PNG Color Count Finder to see exactly how many distinct colors those non-grayscale pixels introduce.

References

Frequently Asked Questions