Image to Grayscale

Convert an image to grayscale in your browser.

Your pictures stay on this device. They are turned gray in your browser and are never uploaded.

JPG, PNG, GIF, WebP, BMP or AVIF. One picture or many at once. You can also paste a picture.

Lower it to keep faint pencil lines. Raise it to leave rough paper white.

Drag across the picture to compare color and gray

Automatic takes a little more than the quality a JPG was saved at, and never under 85. A JPG that is turned gray without encoding is not touched by this choice.

Rate this tool

How useful was this tool?

Image to Grayscale

To convert an image to grayscale, click Choose pictures, or drop them here, drop your pictures on the box, or paste one. As the page says: “JPG, PNG, GIF, WebP, BMP or AVIF. One picture or many at once. You can also paste a picture.” Choose how bright each color should come out and how many shades of gray you want, then click Save the gray picture (or, for six pictures, Save 6 gray pictures). With one picture, the download starts by itself, named like holiday-gray.jpg.

Everything happens in your browser. The page says “Your pictures stay on this device. They are turned gray in your browser and are never uploaded.” In testing, the page sent nothing out and asked no other site for anything while it worked.

Gray and black and white are two different results here. All 256 shades, the choice at the start, gives a gray picture: what most people mean by a black-and-white photo. Black and white only keeps just two shades, pure black and pure white, as for a scanned page of writing.

What the page shows for each picture

Each picture shows its name, its size and kind, and what will happen to it. For example:

768 × 512 pixels (0.4 megapixels), JPG, 75.5 KB

“Will be turned gray without encoding it again: its brightness is kept as it stands and its color is left out.”

With one picture, it’s shown half in color and half gray, marked Color and Gray: “Drag across the picture to compare color and gray”. The gray half changes as soon as you change a choice, so you can try the options before you save anything.

With more than one, each picture is shown gray in a grid and the page counts them, for example 6 pictures. The × on a picture (Take this picture off the list) takes that one off, and Take all off the list empties the list.

A file that isn’t a picture is named in a message such as “notes.jpg is not a picture your browser can open.” If your browser can’t open an iPhone photo, the page says “Your browser cannot open HEIC photos. Turn photo.heic into a JPG first, then choose the JPG here.” HEIC to JPG does that.

Which grayscale formula to choose

For most photos, keep the choice at the start, The usual formula: 30% red, 59% green, 11% blue. The list How bright each color comes out has eleven ways to turn red, green and blue into one gray, and each decides which colors turn light and which turn dark. Under the list, the page explains the one you chose. For the usual formula:

This is the formula of television and of the JPG format itself. A color JPG is turned gray this way without being encoded again: its brightness is kept as it stands and only its color is left out.

Its exact weights are 0.299, 0.587 and 0.114 (ITU-R BT.601). On a PNG or any other picture, the gray is the same, to the last digit, as Pillow’s convert("L") gives.

As bright as the eye sees each color weighs the light itself rather than the stored numbers. The colors are taken off the sRGB curve, weighed 21% red, 72% green and 7% blue, and put back on it. The page says:

Each color is weighed by how bright it looks: green counts most, blue least, worked out on the light itself and not on the stored numbers. Strong colors come out lighter than with the usual formula: pure green 220 instead of 150, pure blue 76 instead of 29. Grays stay as they are.

The plain average of red, green and blue: “Red, green and blue count the same. Blue comes out lighter and green darker than the eye sees them.”

Lightness: halfway between the strongest and the weakest color: “Every pure color comes out the same middle gray, however bright it looks.”

How some colors come out, from 0 (black) to 255 (white), worked out with the page’s own code:

Color (red, green, blue) Usual formula As the eye sees Plain average Lightness
Pure red (255, 0, 0) 76 127 85 128
Pure green (0, 255, 0) 150 220 85 128
Pure blue (0, 0, 255) 29 76 85 128
Yellow (255, 255, 0) 226 247 170 128
Sky blue (135, 206, 235) 188 196 192 185
Skin (224, 172, 105) 180 181 167 165

Black-and-white film filters: which one darkens a sky

The infrared look darkens a deep blue sky most, then the red filter, while the blue filter turns it pale. These six ways sit under Like black-and-white film behind a color filter, and the page explains them. For the red filter:

Photographers put a colored glass in front of black-and-white film: it lets its own color through and holds the others back. Here the picture is made from 100% red.

Each filter’s note names its own mix:

  • Red filter: blue skies dark, skin light: 100% red.
  • Orange filter: skies darker, skin smooth: 50% red, 50% green.
  • Yellow filter: a little more sky: 34% red, 66% green.
  • Green filter: leaves light, lips dark: 100% green.
  • Blue filter: skies pale, skin dark: 100% blue.
  • Infrared look: leaves glow, deep blue skies go black: 50% red, 150% green, less 100% of the blue.

Here’s what they do to a real sky and to a few colors. The sky is the average gray of the top eighth of a 640 × 480 photo from an Olympus C960 camera: a clear, deep blue sky over autumn hills.

Way Blue sky in the photo Skin (224, 172, 105) Leaf (60, 140, 40) Lips (190, 80, 90)
The usual formula 106 180 105 114
Red filter 48 224 60 190
Orange filter 85 198 100 135
Yellow filter 96 190 113 117
Green filter 121 172 140 80
Blue filter 180 105 40 90
Infrared look 26 255 200 125

So for a dark, dramatic sky with natural-looking skin, choose the red filter, or orange for a milder one. The infrared look goes further: leaves turn light, skin turns white and a deep blue sky nearly black. A pale sky near the horizon only goes mid gray, though: sky blue (135, 206, 235) comes out 142.

To set the shares yourself, choose A mix of my own. It shows three sliders, Red, Green and Blue, each from -100% to 200%, starting at 30%, 59% and 11%: the usual formula. The note adds them up, for example:

The three shares add up to 100%. At 100% the picture stays as bright as it is; above, it gets lighter, and below, darker.

Grayscale or black and white only

Shades of gray decides it: All 256 shades (at the start) gives a normal gray picture, and Black and white only leaves every pixel pure black or pure white. In between are 16 shades and 4 shades. Without dots, these turn a photo into flat bands of gray, like a poster.

With fewer than 256 shades, a second list appears, The shades in between:

  • Left out: each pixel takes the nearest shade (at the start) gives flat areas with hard edges. Choose it for writing, drawings and logos.
  • Scattered dots stand in for them hands each pixel’s rounding on to its neighbors (Floyd and Steinberg’s method). From a distance, the missing shades are still there. Choose it for photos.
  • A regular pattern of dots stands in for them uses an even 8 × 8 pattern, for a grid-like look.

With dots, the page adds:

The dots are as fine as the pixels of the saved picture. A large picture is shown smaller here, so its dots look coarser on the page than they will be.

To see them as they will be, look under the picture. For a large picture, with one picture on the list and fewer than 256 shades, a second view appears there: A piece of the picture at its real size. It shows up to 560 × 320 pixels of the picture, pixel for pixel, and changes with every choice, like the picture above it. It starts in the middle. Under its title, the page says “Drag it to see another part. The yellow frame on the picture above shows where it is.” Drag it like a map: when you let go, it shows the part of the picture you pulled into view, such as a face or a line of small writing. With the regular pattern, the piece is exactly that part of the saved picture. With scattered dots, the dots are as fine but fall a little differently in the saved picture, because each dot depends on the pixels before it.

With Each picture's own format, a picture with fewer shades is saved as a PNG that holds exactly those shades, in as few bits as they need: 4 bits a pixel for 16 shades, 2 for 4 shades, 1 for black and white. For example: “Will be saved as a black-and-white PNG, at 1 bit a pixel.” That’s why these files are so small. The 768 × 512 test photo in black and white only came to 6,299 bytes, against 75.5 KB for the color JPG.

A picture with see-through parts keeps them: “Will be saved as a PNG of 4 shades. It has see-through parts, which take 8 bits a pixel.”

Under Save as, the page says why a JPG becomes a PNG here:

With fewer than 256 shades a JPG, WebP, BMP or AVIF picture is saved as PNG: only PNG stores exactly those shades, at 1, 2 or 4 bits a pixel. A PNG stays a PNG and a GIF a GIF.

If you choose JPG anyway, the picture is told: “A JPG smears the hard edges of a picture with few shades and is larger than a PNG of it. PNG keeps them crisp.”

A GIF keeps its frames as they are, so it gets no dots. With dots chosen, the page says: “In a GIF each color is set to its nearest shade: a GIF's frames are not redrawn, so they get no dots.”

Where black ends: black and white for a scanned or photographed page

For a scanned page, choose Black and white only with Left out: each pixel takes the nearest shade, and keep the first choice of the list that appears, Where black ends. For a page photographed with a shadow on it, choose the second. The three choices:

At one shade for the whole picture, found by the page (at the start):

Every pixel up to that shade turns black, every lighter one white. The page finds the shade that parts the dark from the light best, which suits a scanned page of writing. Each picture says where its split fell.

The page finds that shade with Otsu’s method, on the picture as it shows it, and uses the same shade for the saved file, so what you see is what you get. Under each picture, it says where the split fell, for example “Black up to 137 of 255: the split found for this picture.” A GIF is split at that shade too.

It follows the light: for a photographed page with a shadow on it:

Each pixel is compared with the pixels around it, so a shadow across the page does not turn into a black patch: the paper stays white and the writing black. It is made for writing and line drawings. Of a photo it keeps little more than the edges.

Each pixel is compared with the average of the square around it, a square an eighth of the picture’s longer side across (Bradley and Roth’s method). How much darker than that average a pixel has to be to turn black is set by the slider Black when darker than its surroundings by, from 5% to 40%. It starts at 15%. Beside it, the page says: “Lower it to keep faint pencil lines. Raise it to leave rough paper white.”

On a page made for the test, with a shadow that darkens the paper from one side to the other, at the 15% the slider starts at:

Where black ends Paper that came out white Writing that came out black
At one shade for the whole picture 56% 100%
It follows the light 100% 100%

That 640 × 420 test page came out as “640 × 420 pixels, PNG, 326 B. A black-and-white PNG, 1 bit a pixel. That is 99% smaller than the original (115.0 KB).” Working out this split takes about 0.15 seconds for 12 megapixels. A GIF can’t follow the light, since its frames aren’t redrawn, and is told: “A GIF is split at one shade, the one found for it: its frames are not redrawn.”

At a shade I set:

Every pixel up to the shade you set turns black, every lighter one white. The slider starts at the shade the page found.

The slider Black up to runs from 0 to 254 and reads, for example, 137 of 255. At 60 of 255, a pixel of 60 turns black and a pixel of 61 white. Since the slider starts where the page found the split, a small change is a small step.

JPG to grayscale without losing quality

With the usual formula, a color JPG is turned gray without being decoded or encoded again, so it loses nothing but its color. Here’s why that works. A color JPG doesn’t store red, green and blue. It stores a brightness part and two color parts, and the camera or program made the brightness part with the usual formula. That brightness part is a gray picture already. So the page leaves the two color parts out and writes the brightness part as it stands. Nothing is rounded again.

Before you save, the picture’s line reads “Will be turned gray without encoding it again: its brightness is kept as it stands and its color is left out.” Afterwards: “Turned gray without encoding it again: its brightness is exactly what the color file held.”

This was checked with Pillow on 163 color JPGs, 30 of them straight from cameras and phones (Canon, Nikon, Fujifilm, Kodak, Olympus, Ricoh, Sanyo, Sony, Pentax, Samsung, Konica Minolta, iPhone, Nokia and Jolla). In every one, each pixel of the gray JPG was the brightness the color file held.

The file gets smaller too, since it stores one part instead of three. Camera and phone photos came out 15 percent smaller on average. A 12-megapixel photo went from 2.34 MB to 2.06 MB, a 48-megapixel one from 7.44 MB to 6.40 MB.

It works when three things hold: The usual formula: 30% red, 59% green, 11% blue, All 256 shades, and the JPG kept a JPG (Each picture's own format or JPG under Save as). Any other way to weigh the colors has to be worked out pixel by pixel, and the page says so:

Will be made gray pixel by pixel and encoded as a gray JPG (quality 95). Only the usual formula can keep a JPG as it stands.

A few JPGs can’t keep their brightness part as it stands. Each gets its reason after the same first sentence:

  • “This is a four-color (print) JPG, which has no brightness part to keep.”
  • “This JPG stores red, green and blue and has no brightness part to keep.” This is rare.
  • “This file breaks off before its end, so only the browser can still make a picture of it.”
  • “At over 100 megapixels it is too large to be taken apart in a browser.”

A JPG that’s gray already is left alone: “Is gray already. It will be handed back as it is.” The file you get is the same to the byte. A JPG that turns out to be damaged inside while it’s read is drawn by the browser, and the result ends “The file is damaged, so the browser drew what it could of it.”

When a JPG has to be encoded

It’s encoded once, by the page itself, and the result says so: “A gray JPG of one part, encoded at quality 95.” A browser’s own encoder always writes three parts, which makes the file larger. On 40 test files, the page’s encoder came as close to the picture as Pillow’s (within 0.3 dB) and within 4 percent of its size. Such a JPG keeps its date, camera and place, stands upright for real (its note that says which way up it goes is set to “as it is”), and stays progressive if it was.

Encoding at a high quality can make the file larger than the original. The 75.5 KB test photo, weighed the eye’s way:

Quality Gray JPG
Automatic (95 for this photo) 78.0 KB
90 63.1 KB
85 55.1 KB
80 42.5 KB

The same photo with the usual formula, not encoded at all: 63.0 KB.

Save as, and quality

Save as starts at Each picture's own format, and also offers JPG, PNG and WebP:

A JPG stays a JPG, a PNG a PNG, a GIF a GIF and a WebP a WebP. BMP and AVIF pictures are saved as PNG: a browser cannot write those two.

A picture with see-through parts saved as JPG is laid on white, since a JPG can’t be see-through.

Quality, where a picture has to be encoded appears only when one of your pictures will be encoded as a JPG or WebP. It offers Automatic, 100, 95, 90, 85, 80, 70 and 60:

Automatic takes a little more than the quality a JPG was saved at, and never under 85. A JPG that is turned gray without encoding is not touched by this choice.

In numbers, Automatic is the quality read off the JPG plus 5, between 85 and 97, and 92 for a picture that isn’t a JPG. A PNG, GIF, BMP, or a WebP that has lost nothing so far, saved as WebP gets 100, which Chrome and Firefox write without loss.

PNG, GIF and WebP: transparency, 16 bits and animation

All three keep what they have, see-through parts, 16 bits and movement, except that a moving WebP keeps only its first frame.

A PNG is read by the page itself, not through the browser’s canvas, and saved as a gray PNG: “Will be saved as a gray PNG: one number a pixel instead of three.” Over the larger test PNGs, the gray files took 46 percent of the size of the color ones.

  • See-through and half see-through parts keep their exact values. (With fewer shades, a PNG of 16 bits keeps them at 8 bits.)
  • A PNG of 16 bits a channel stays one: “Will be saved as a gray PNG of 16 bits: one number a pixel instead of three, as fine as the original.”
  • A moving PNG keeps moving: “Will be saved as a gray PNG that keeps moving: all 3 frames, with their timing.”
  • With all 256 shades, a PNG that keeps its colors in a table, as a drawing or a screenshot of few colors does, goes gray in that table alone: “Will be turned gray in its color table alone. The picture itself is not touched.” The file stays the same length to the byte.
  • A PNG that’s gray already is handed back as it is.

A GIF goes gray in its color table, so the file stays the same length to the byte and only its colors change. A moving GIF keeps moving: “Will be turned gray in its color tables alone. All 3 frames and their timing stay as they are.” Under a moving picture, the page notes “The first frame is shown here. The saved picture keeps moving.” This was checked on 62 GIFs, frame by frame.

A WebP stays a WebP. One that has lost nothing so far is saved without loss: “Will be made gray and saved as WebP without loss.” A lossy one is encoded again: “Will be made gray and saved as WebP (quality 92).” A lossy WebP always stores color, so a few of its gray pixels can come back with red, green and blue one step apart: 1.7 percent of the pixels of the test picture, never more than 1 of 255.

A moving WebP keeps only its first frame: “This picture moves. Only its first frame is turned gray and saved.” So does a moving GIF or PNG that you save as another kind.

BMP and AVIF pictures are saved as gray PNG.

Convert many images to grayscale at once

Choose up to 300 pictures at once. The button then reads, for example, Save 6 gray pictures, and the page counts Picture 3 of 6… as it works. Afterwards it sums up: “6 pictures saved: 158.5 KB instead of 181.2 KB.”

Each picture has its own Download, named like holiday-gray.jpg. Download all as a ZIP gives gray-pictures.zip, with the pictures under the names they came with. Two pictures of one name get “(2)”.

Stop works between pictures: “Stopped. 2 of 6 pictures are done.” The finished ones keep their downloads. If you change a choice afterwards, the earlier results are taken back, so you can’t download one made with the old choice.

In black and white, At one shade for the whole picture, found by the page gives each picture a split of its own, said under it, so a darker scan isn’t held to the split of a lighter one. At a shade I set uses your shade for every picture on the list, and its slider starts at the shade found for the first one.

What stays in the file

Camera details stay wherever a JPG stays a JPG.

  • A JPG turned gray without encoding keeps its date, camera, lens and place, its note that says which way up it goes (so a phone photo still shows upright), its XMP and its comments. Its color profile is taken out, since it describes colors, and so is the small preview copy some cameras keep inside the file, which would still be in color.
  • A JPG that’s encoded keeps its date, camera and place too.
  • A picture saved as another kind loses them, and is told before: “This picture carries camera details (date, place, model). They only go along where a JPG stays a JPG.”
  • A phone photo with a second picture behind the first: “This photo holds a second picture behind the first, as phones store a depth map or the brighter version of an HDR photo. The gray copy leaves it out.” The result line then says how much was left out, for example “What stood behind the picture in the file (3.9 KB) was left out.”
  • A PNG keeps its text notes and print size. A GIF keeps everything but its colors.

A photo saved with a wide color profile, such as Adobe RGB, keeps the gray of its stored numbers. On four such test photos, that gray was on average 2 shades of 255 from a gray read with the profile, and never more than 13.

The place a photo was taken stays in a gray JPG. To take it out, use the Metadata (EXIF) Remover.

Example

A 768 × 512 color photo, with the choices as they start. When it’s chosen, the page shows:

768 × 512 pixels (0.4 megapixels), JPG, 75.5 KB

“Will be turned gray without encoding it again: its brightness is kept as it stands and its color is left out.”

After Save the gray picture, the download starts and the result line reads:

“768 × 512 pixels, JPG, 63.0 KB. Turned gray without encoding it again: its brightness is exactly what the color file held. That is 17% smaller than the original (75.5 KB).”

With Black and white only, the line under the picture changes to “Will be saved as a black-and-white PNG, at 1 bit a pixel.” and the page adds “Black up to 137 of 255: the split found for this picture.”

The same photo with other choices:

Choice Saved as Size
The usual formula, all 256 shades JPG, not encoded again 63.0 KB
As bright as the eye sees, quality Automatic (95) Gray JPG, encoded 78.0 KB
The usual formula, black and white only, black up to 137 of 255 (found by the page) PNG, 1 bit a pixel 6,299 bytes

How long it takes

A 12-megapixel photo takes under a second and a half. Measured in Chrome 157 on a desktop computer with an AMD Ryzen 9 3950X:

Picture and choice Time
12-megapixel color JPG, turned gray without encoding 0.7 s
The same photo as a progressive JPG 1.4 s
48-megapixel color JPG, turned gray without encoding 1.7 s
12-megapixel JPG weighed the eye’s way, encoded as a gray JPG 1.2 s
12-megapixel JPG in black and white with scattered dots, saved as PNG 0.8 s
300 small PNGs 3.9 s to read them, 1.4 s to turn them gray and pack the ZIP

The 12-megapixel photo in black and white with scattered dots came to 1.07 MB as a PNG, against 2.34 MB for the color JPG. Phones and tablets weren’t timed.

Limits

  • You can choose 300 pictures at a time. Choose more and the page says “That is more than 300 pictures. The first 300 were taken.” Do the rest in a second round.
  • The page’s own readers take pictures of up to 100 megapixels. A larger JPG is drawn by the browser and encoded, with the reason given above. If the browser can’t hold a picture that large, the page says, for example, “photo.png could not be turned gray: this browser cannot hold a picture of 30,000 × 20,000 pixels.” If the device runs out of memory, the reason reads “the picture is too large for this device's memory”. The largest photo tested was 48 megapixels.
  • A HEIC photo your browser can’t open has to be turned into a JPG first, with HEIC to JPG.
  • A moving WebP keeps only its first frame.
  • Saving as WebP needs a browser that can write WebP. If it can’t, the result says “This browser cannot write WebP, so it is a PNG.”
  • If the ZIP can’t be put together, the page says “The ZIP could not be put together. Download the pictures one by one.”
  • The tool makes gray and nothing else: no sepia or other tints, no brightness or contrast. For those, see below.

Which tool for which job

FAQ

Is grayscale the same as black and white?

Not quite. Grayscale keeps up to 256 shades of gray, which is what most people mean by a black-and-white photo, while black and white only keeps two: pure black and pure white. Under Shades of gray, choose All 256 shades for the first and Black and white only for the second.

Does converting a JPG to grayscale lose quality?

Not with the usual formula: a color JPG is turned gray without being encoded again, so every pixel keeps the brightness the color file held. Other ways to weigh the colors are worked out pixel by pixel and encoded once, as a gray JPG at the quality you choose.

Does converting to grayscale reduce the file size?

Usually, yes. A gray file stores one number a pixel instead of three: color JPGs from cameras and phones came out 15 percent smaller on average, and larger PNGs about half their size. A JPG that has to be encoded again at a high quality can come out larger than the original.

What is the formula to convert RGB to grayscale?

The usual one is 0.299 × red + 0.587 × green + 0.114 × blue, the formula of television and of the JPG format itself. The tool also offers the eye’s way (21% red, 72% green, 7% blue, worked out on the light itself), the plain average, lightness, six film filters and a mix of your own.

Can I convert many images to grayscale at once?

Yes, up to 300 at once. Each picture gets its own download, and Download all as a ZIP gives them all in gray-pictures.zip under the names they came with.

Does a transparent PNG stay transparent?

Yes. A gray PNG keeps its see-through and half see-through parts, and with all 256 shades every value stays exactly as it was. Only a picture saved as JPG is laid on white, since a JPG can’t be see-through.

Can I make an animated GIF grayscale?

Yes. A GIF goes gray in its color tables alone, so every frame and its timing stay as they are, and a moving PNG keeps moving too. A moving WebP keeps only its first frame.

How do I turn a scanned or photographed page into pure black and white?

Choose Black and white only with Left out: each pixel takes the nearest shade. For a scan, keep At one shade for the whole picture, found by the page; for a page photographed with a shadow on it, choose It follows the light: for a photographed page with a shadow on it, so the shadow doesn’t turn into a black patch. Either way the paper turns white and the writing black, saved as a PNG of 1 bit a pixel.

Are my pictures uploaded?

No. The pictures are turned gray in your browser and never leave your device.

Note: All processing is done client-side. We do not store or see your data.

Related Tools

Contact

Missing something?

Feel free to request missing tools or give some feedback using our contact form.

Contact Us