Categories

Image Binary Converter

Convert images to binary (black and white) with customizable threshold and options

Click to upload file or drag and drop file here

Maximum file size: 10MB Supported formats: image/jpeg, image/png, image/webp, image/gif, image/bmp, image/tiff

Pixels with value >= threshold become white, others become black

If checked, black and white colors will be inverted

Key Facts

Category
Design
Input Types
file, number, checkbox
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The Image Binary Converter allows you to transform any color or grayscale image into a high-contrast monochrome format. By applying a specific threshold value, you can isolate shapes, simplify complex visuals, or prepare images for OCR and stencil printing.

When to Use

  • Preparing images for optical character recognition (OCR) to improve text detection accuracy.
  • Creating clean, high-contrast stencils or line art from detailed photographs.
  • Reducing image file complexity for technical documentation or simplified graphic design assets.

How It Works

  • Upload your source image file in JPEG, PNG, WebP, GIF, BMP, or TIFF format.
  • Set a threshold value between 0 and 255 to define the cutoff point for black and white pixels.
  • Toggle the invert option if you need to swap the resulting black and white areas.
  • Process the image to generate and download your new binary file.

Use Cases

Isolating text from scanned documents for better readability.
Generating simplified silhouettes for logo or icon design.
Creating high-contrast masks for image editing workflows.

Examples

1. Optimizing Scanned Text

Archivist
Background
A collection of old, faded documents needs to be digitized for a database.
Problem
The original scans have gray backgrounds and low-contrast text, making them difficult to read.
How to Use
Upload the scan and set the threshold to 180 to push the gray background to white and the text to solid black.
Example Config
threshold: 180, invert: false
Outcome
A crisp, high-contrast black-and-white document that is perfectly legible for archival storage.

2. Creating a Stencil

Graphic Designer
Background
A designer needs to create a simple stencil pattern from a portrait photo.
Problem
The photo has too much detail and color depth for a simple two-layer stencil.
How to Use
Upload the portrait and adjust the threshold until the facial features are clearly defined in black and white.
Example Config
threshold: 120, invert: true
Outcome
A clean, inverted monochrome image ready to be printed and cut as a stencil.

Try with Samples

image, png, jpg

Related Hubs

FAQ

What does the threshold value do?

The threshold determines the brightness cutoff. Pixels with a value equal to or greater than the threshold become white, while those below it become black.

Can I invert the colors of the output?

Yes, checking the 'Invert Result' box will swap the black and white pixels in your final image.

What file formats are supported?

You can upload JPEG, PNG, WebP, GIF, BMP, and TIFF files.

Is there a file size limit?

Yes, the maximum allowed file size for processing is 10 MB.

Does this tool support batch processing?

No, this tool is designed to process one image file at a time.

API Documentation

Request Endpoint

POST /en/api/tools/image-binary

Request Parameters

Parameter Name Type Required Description
imageFile file (Upload required) Yes -
threshold number Yes Pixels with value >= threshold become white, others become black
invert checkbox No If checked, black and white colors will be inverted

File type parameters need to be uploaded first via POST /upload/image-binary to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-image-binary": {
      "name": "image-binary",
      "description": "Convert images to binary (black and white) with customizable threshold and options",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=image-binary",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]