EditSafely

Threshold a PNG

Turn a PNG into a stark black-and-white mask at a brightness cutoff. Runs entirely in your browser, so your data never leaves your device.

Input

Drop a file here, or click to browse

Files never leave your device

Output

The result appears here as you type.

Options

How to use Threshold a PNG

  1. 1. Add the PNG to convert. Drop or browse for the PNG you want turned into a black-and-white mask. Photos with clear contrast between subject and background produce the cleanest result once thresholded.
  2. 2. Set the Brightness cutoff (0-255). Every pixel brighter than this value becomes pure white and every pixel darker becomes pure black. A low cutoff keeps more of the image white, a high cutoff keeps more of it black.
  3. 3. Download the thresholded image. The output is a stark two-color mask with no grays remaining, useful anywhere you need a hard-edged black-and-white version of a photo instead of its original grayscale range.

When to use Threshold a PNG

Threshold a PNG converts every pixel to pure black or pure white based on a single brightness cutoff. It is the tool to reach for whenever an image needs to become a stark, two-color mask instead of a photo.

  • Preparing a stencil for laser cutting. A laser cutter needs a strict black-and-white file to know where to cut and where to leave material. Thresholding a traced design at the right cutoff produces exactly that mask.
  • Cleaning up a scanned document. A scanned page has uneven lighting that leaves the background gray instead of white. Thresholding it at a cutoff just above the text pushes the background to white and the text to black.
  • Generating a silhouette for a design. A photo of a person or object needs to become a flat black silhouette against white for a poster or logo. Thresholding it at the right cutoff produces that shape directly.
  • Building a QR-style pattern mask. A generative art project needs a strict binary pattern derived from a photo's brightness values. Thresholding the source image gives the hard black-and-white grid the project needs.

Examples

High-contrast mask

Input

photo.png + cutoff 128

Output

photo.png: pixels above 128 become white, below become black

About the Threshold a PNG tool

Threshold a PNG does its work locally, right in the browser. Turn a PNG into a stark black-and-white mask at a brightness cutoff. There is no upload step, no queue and no account, and your data never travels over the network.

It belongs to the PNG Tools collection on EditSafely, a set of 108 small, focused PNG utilities that share the same instant, private workspace.

You can shape the output with the Brightness cutoff (0–255) setting, and the result refreshes the moment you change it. The finished file is put together in browser memory and saved with the Download button, so it never touches a server on the way to your disk. A worked example further down the page shows exactly what the tool produces for a real input.

Running locally also makes the tool fast and dependable: results appear as you type or drop a file, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.

Frequently asked questions

Does Threshold a PNG cost anything?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Are my files uploaded to a server?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

Which files does Threshold a PNG accept?

It accepts PNG images. There is no file size cap imposed by a server; very large files are limited only by your device's memory.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

How do I save the output?

Click the Download button once the result is ready. The file is built in your browser's memory and handed straight to your downloads folder, without passing through a server.

Related tools

All PNG Tools