# Convert Image to Black and White

> A free online tool that converts a picture to shades of gray, or to pure black and white with a threshold from 0 to 255 and an optional dither, using fixed brightness weights, and saves it as PNG, JPEG, WebP or GIF.

Convert Image to Black and White with our free online tool. Upload one picture, and the tool turns each color into a shade of gray, or into pure black and white with a threshold you set, while keeping the picture size the same. You can turn image black and white in a few clicks, as a photo to black and white converter, with no account needed for a small number of jobs per day.

## Key facts

- Input: one picture up to 5 MB in the free tool and 10 MB when signed in, and up to 16 MP (4096 x 4096); animated GIF and WebP are converted frame by frame within the animation limits.
- Settings: grayscale or pure black and white (threshold, default 128, and dither, off on the page), keep transparency (on by default) or fill it with a color, save as the same type, PNG, JPEG, WebP or GIF, and quality for JPEG and WebP.
- Each pixel gets 0.299 x red + 0.587 x green + 0.114 x blue as its gray value; in our test a red of 217, 56, 30 became gray 101, and a generated picture had 189 gray levels; at threshold 128 with no dither the same picture saved as PNG had exactly 2 colors, while a JPEG of it had 32 gray levels.
- The upload is deleted when the job ends and the result after 10 minutes; signed-in users pay 1 credit per file plus 1 credit for each started 5 MB of result beyond the first 5 MB and, for an animation, 1 credit for each started 10 MP of frames beyond the first 10 MP.
- Free without an account: up to 10 conversions per minute and 50 per day per visitor, no watermark. Signed in, each render costs 1 credit (100 free credits every month).
- Files are deleted automatically: 10 minutes after conversion without an account, 1 day with a free account.
- Developers can run the same job with POST https://api.aiipworld.com/v1/image-jobs?op=image_edit (the image as the request body, settings in the query string) and an API key (see the API docs page).

## How it works

1. Upload one picture. PNG, JPG, WebP, AVIF, GIF, BMP and TIFF files are accepted.
2. Under "Result", keep "Shades of gray (grayscale)" or choose "Pure black and white (two colors)" and set the Threshold; the default is 128.
3. In pure black and white, leave Dither off for a hard edge, or turn it on for a dot pattern that imitates grays.
4. Choose "Save as". Keep "Same as the original" or pick PNG, JPEG, WebP or GIF.
5. Set Quality if you save as JPEG or WebP. The default is 90.
6. Leave "Keep transparency" on to keep transparent areas, or turn it off to fill them with a color.
7. Click "Convert to black and white", then check the result panel and download the file.

## How to Convert Image to Black and White

Upload your picture and click "Convert to black and white". The tool sends the file to our server, where the change is made, and then shows the converted picture in the result panel. It works as a black and white photo converter without installing anything.

You can use this tool for one picture at a time. Each job gives you one converted file, so repeat the steps for each picture you want to change.

## Convert Image to Black and White: Shades of Gray

The default mode makes a grayscale image. Each pixel keeps its brightness and loses its color, so the result is made of gray shades. For a two-tone picture with only pure black and pure white, choose "Pure black and white".

Our converted test picture had 189 different gray levels. The tool does not change contrast, brightness or sepia either.

## Pure Black and White: Threshold and Dither

In Pure black and white mode every pixel becomes black or white. The tool first works out the gray level with the same weights, then compares it with the threshold, a number from 0 to 255 whose default is 128. With Dither off, a pixel at or above the threshold turns white and every other pixel turns black. A lower threshold gives more white, and a higher threshold gives more black.

With Dither on, an error-spreading pattern of black and white dots imitates the gray levels, like a newspaper photo. The threshold then moves the overall lightness, and 128 is neutral. In our test, the 800 x 560 px illustration at threshold 128 saved as PNG had exactly 2 colors, at 3 KB with Dither off and 38 KB with Dither on, against 8 KB for the grayscale version.

## JPEG Noise and Animations in Pure Black and White

JPEG compression adds grey noise around black and white edges. In our test, the same threshold 128 picture saved as JPEG had 32 gray levels instead of 2 and was 14 KB. Save as PNG, or GIF for an animation, to keep exactly two colors.

On an animated GIF or WebP, Dither is worked out on each frame by itself, so flat areas can flicker. Turn Dither off for a steady black and white animation.

## How the Gray Level of Each Color Is Worked Out

Each gray level is worked out as 0.299 times red, plus 0.587 times green, plus 0.114 times blue. These are the Rec. 601 weights that common image libraries use for gray. The formula uses the stored color values of each pixel.

Pure red becomes gray 76, pure green becomes gray 149 and pure blue becomes gray 29. So a green leaf can look lighter than a red flower of the same strength. In our test, the red house wall (217, 56, 30) became gray 101, as the formula gives.

## Transparent Areas

Transparency is not changed by this tool. Only the colors change. A transparent PNG stays transparent when you keep PNG or WebP.

JPEG cannot hold transparency. If you save as JPEG, the transparent areas are filled with the background color, which is white unless you change it. The result panel tells you when this happens.

## Choose the File Format

"Same as the original" is the default and keeps the type of your file. A GIF stays a GIF, and BMP and TIFF files are saved as PNG. AVIF files are saved as WebP.

Choose PNG when you need every pixel kept exactly. Choose JPEG or WebP when you want a smaller file, and set Quality if you do. JPEG and WebP are lossy, so the default quality is 90.

## File Size of a Gray Picture

An opaque result saved as PNG or JPEG is stored as a single-channel gray file, which is often smaller. In our test, an 800 x 560 px PNG illustration of 24 KB became a gray PNG of 8 KB. Saved as JPEG, the same picture was 14 KB.

Results vary with the picture.

## Converting an Animated GIF or WebP

Every frame of an animated GIF or WebP is converted, and the animation is kept when the output is GIF or WebP and the animation checkbox is on. In our test, a 24 frame GIF of 320 x 240 px and 88 KB became a 24 frame GIF of 67 KB.

With PNG or JPEG output, or with the checkbox off, only the first frame is used. Results vary with the animation.

## Limits: Size and Pixels

Each picture can be up to 5 MB without an account, and up to 10 MB when you are signed in. The picture can have up to 16 MP (4096 x 4096) in width times height, and the tool checks this before the picture is opened.

The result can be up to 20 MB. A large photo saved as PNG may pass that limit, and then the job fails with output_limit and the credits are refunded. Use JPEG or WebP for large photos.

## What to Check in the Result

Look at the converted picture in the result panel first. Check that light and dark areas still show the detail you need, and that transparent areas look as you expect.

The panel also shows the size of the result, what was done and the credits used. Download the file before you leave the page, because download links are short-lived.

## Convert Image to Black and White from Code

You can send the same change through the API. Send a POST request to https://api.aiipworld.com/v1/image-jobs?op=image_edit&action=grayscale with the raw picture bytes as the body, not JSON or multipart. Set Content-Type to the type of your picture, such as image/png or image/jpeg, and send your key with Authorization: Bearer or x-api-key.

For pure black and white, add threshold (0 to 255) and dither (true or false) to the query string. If you give a threshold and leave dither out, dither is on; the page always sends it.

The response is 202 with a job_id. Poll GET /v1/jobs/:id, then download the result from download_url, which is a short-lived signed link. The page shows a ready cURL, Node and Python example built from the settings you chose. Errors include 400 invalid_params, 400 unsupported_image, 413 file_too_large, 402 insufficient_credits and 429 rate limited.

## Privacy: What Happens to Your Picture

The uploaded file is used only to make the result. The working copy is deleted as soon as the job ends, whether it succeeds or fails. The result is deleted after 10 minutes in the free web tool, and no history is kept.

Camera and location tags are not written to the result. You must have the right to use the picture you upload, as set out in our Acceptable Use Policy.

## Questions

### Can I convert an image to black and white for free?

Yes, you can convert an image to black and white for free without signing up, up to 30 jobs per day per visitor. Signed-in users skip the human check and use credits.

### How do I turn a photo black and white?

To change a photo to black and white, upload the photo, choose your "Save as" format, and click "Convert to black and white". The result panel then shows the converted picture for download.

### Is the result pure black and white or gray?

By default it is gray shades; our test picture had 189 different gray levels. Choose Pure black and white for exactly two colors, with a threshold from 0 to 255.

### What does the threshold do?

Pixels at or above the threshold turn white and the rest turn black, so a lower value gives more white and a higher value more black. The default is 128.

### What is dither?

Dither spreads the rounding error as black and white dots, so the picture still suggests gray levels. It makes a larger file and can flicker in an animation.

### Why is my JPEG not strictly black and white?

JPEG compression adds grey noise around the edges. Save as PNG, or GIF for an animation, to keep exactly two colors.

### Why do some colors look lighter than others in gray?

Gray levels follow the weights 0.299 for red, 0.587 for green and 0.114 for blue. So green becomes a lighter gray than red or blue of the same strength.

### What is a grayscale image?

A grayscale image stores each pixel as a shade of gray instead of a color. This tool makes that kind of picture from your original.

### Can I get the colors back?

No, this tool does not keep the colors. Keep your original file if you may need the color version later.

### Does the picture size change?

No, the picture size does not change. Only the colors change.

### What happens to a transparent PNG?

A transparent PNG stays transparent when you keep PNG or WebP. Only the colors are changed.

### Can I convert an animated GIF to black and white?

Yes, every frame is converted when the output is GIF or WebP and the animation checkbox is on. With PNG or JPEG output, only the first frame is used.

### Can I convert an image to black and white in my own code?

Yes, you can send a POST request to the image_edit endpoint with action=grayscale, and add threshold and dither for pure black and white. The page shows ready cURL, Node and Python examples built from your settings.

## Related

- [Rotate Image Online](https://aiipworld.com/tools/rotate-image/index.md)
- [Flip Image Online](https://aiipworld.com/tools/flip-image/index.md)
- [Circle Crop Image](https://aiipworld.com/tools/circle-crop-image/index.md)
- [Blur Image Online](https://aiipworld.com/tools/blur-image/index.md)
- [Add Border to Image](https://aiipworld.com/tools/add-border-to-image/index.md)
- [Round Image Corners](https://aiipworld.com/tools/round-corners-image/index.md)

Page: https://aiipworld.com/tools/image-to-black-and-white/
