Image to ASCII art (and text banners)

Turn pictures into ASCII or block art, or text into big banners, then copy or save.

100
0
0
1.00
0.50

Turn this on when the art will be shown on a dark terminal or page.

ASCII art

Choose a picture to turn it into characters.

What this tool does

Two things. Picture to ASCII turns a photo, logo or drawing into characters: each character stands for a small block of the picture, a dense character such as @ for dark areas and a sparse one such as a dot or a space for light areas. Choose the width in characters, the character set (a detailed 70-level ramp, a classic 10-level ramp, Unicode blocks █▓▒░, or two tones), and adjust contrast, brightness and mid-tones. Keep the picture's colours for the HTML and PNG downloads. Text banner draws what you type in large letters made of characters, with a small built-in font, for README files, terminal splash screens and code comments. Copy the result or save it as text, a PNG picture or a coloured web page. The picture stays on your device.

How a picture becomes characters

  1. The picture is divided into a grid of cells, one per character. Characters are about twice as tall as they are wide, so a 100-column rendering of a square picture has about 50 rows; the "character shape" control changes that if your font differs.
  2. Each cell's brightness is the average of its pixels in linear light. Screen values (sRGB) are gamma-encoded, so averaging them directly makes fine detail look too dark: a cell half black and half white averages 127.5 in sRGB, but it gives off half the light of white, which the eye sees as a light grey.
  3. That light is converted to perceptual lightness (CIE L*, 0 to 100), so equal steps along the character ramp look like equal steps in brightness.
  4. Contrast, brightness and the mid-tone (gamma) controls adjust the value, and it is mapped onto the ramp: black to the densest character, white to the sparsest.

The article on character ramps and gamma works through these numbers with examples.

Choosing settings

  • Width: 60 to 100 characters for chat and README files, 150 to 300 for posters and PNG output. More width means more detail and a wider result.
  • Ramp: the 10-level ramp is clean and readable; the 70-level ramp shows more tones but looks noisier; Unicode blocks give smooth shading in fonts that draw them at full cell size.
  • Contrast helps photos with a flat, grey look. Mid-tones above 1 darken them, below 1 lighten them.
  • Light text on dark background inverts the mapping: use it for terminals and dark pages, where the bright parts of the picture should get the dense characters.

Text banners

Type up to 80 characters. The built-in font has letters A to Z, digits and common punctuation, five rows tall; accents are removed (Vietnamese "Xin chào" becomes XIN CHAO) and anything else is drawn as "?". Draw it with # signs, full blocks, dark shade, or each letter with itself, at one, two or three times the size. Paste the result into a place that uses a monospace font, or it will not line up.

Good to know

Results depend on the font they are shown in: ASCII art only lines up in a monospace font, and the character density of @ or # differs slightly between fonts. The PNG download draws the art in your system's monospace font. The picture is read from a copy of at most 1,200 pixels on its longest side, more than enough for 300 columns. For text tools, see the text toolkit; for exact colours from the picture, the image colour picker.

Frequently asked questions

Why does my ASCII art look stretched?

Characters are taller than they are wide, so the tool uses about half as many rows as columns per square of picture. If your font is different, change the character shape (0.5 suits most monospace fonts).

Why does it look wrong when I paste it?

ASCII art needs a monospace font. In chat apps, put it in a code block (three backticks); in documents, set the font to Consolas, Menlo or Courier.

Which pictures work best?

Pictures with a clear subject and strong contrast: portraits on a plain background, logos, silhouettes. Busy photos turn into noise; raise the contrast or crop first.

Is the picture uploaded?

No. It is decoded and converted in your browser.

Can I keep the colours?

Yes. Turn on “Keep colours” and download the HTML page or the PNG: each character keeps the colour of its part of the picture. Plain text has no colour.