Image to ASCII Art Converter

Convert a photo into ASCII art, downloadable as TXT or PNG

Drop an image here

or click to choose a file (JPG, PNG, WebP)

About Image to ASCII Art Converter

Turning an image into ASCII art means cutting it into a grid, measuring the average brightness of each cell, and placing a character whose ink coverage matches that brightness. Here you choose the number of columns (20 to 300, up to 2,400 in ultra mode), the tool works out the rows, and you can switch character sets, inversion, gamma, auto contrast and color before copying the text or saving a TXT or PNG.

Three things decide whether the result looks good: which characters you use and in what order (the brightness ramp), how you correct for character cells not being square (aspect ratio), and whether the image's brightness range actually uses the whole ramp.

The brightness ramp

The default ten-step ramp is " .:-=+*#%@". A space leaves the cell almost entirely paper; @ fills a large share of it with ink. The 70-step ramp is Paul Bourke's 1997 list reversed to run light to dark. More steps give smoother gradients, but the characters have very different shapes, so at small sizes the texture can look noisy rather than smooth.

Ink coverage depends on the font. The same # covers a different area in Consolas, Menlo and Courier New, so any ramp is only an approximate ordering. The block ramp (░▒▓█) has well-defined fill ratios and a stable order, but some fonts, especially CJK ones, draw these glyphs at double width. The tool's PNG export uses a Latin monospace font stack and squeezes each glyph into its cell, so the grid holds there; a TXT file uses whatever font the viewer picks, so it can still break in an editor that defaults to a CJK font.

The default mapping assumes dark text on a light background: bright cells get a space, dark cells get @. If you are pasting into a terminal with a black background, turn on Invert, or you will get what looks like a photographic negative.

Character cells are tall: aspect correction

A monospace character cell is typically about 1.8 to 2 times taller than it is wide. Sample the image on a square grid and put one character per sample, and the result is stretched vertically by that factor. The tool therefore computes rows as columns × (image height / width) × character aspect ratio. The default is 0.55, adjustable from 0.3 to 1.

If the output looks squashed or stretched, set this value to match the font where the art will be displayed. Editors and web pages with generous line-height make each row taller still, so lower the value for those.

How a cell's brightness is measured

Each cell is summarized by the average color of all pixels in its block rather than a single sample point, which keeps fine texture from turning into random speckle. Transparent pixels count in proportion to their alpha, and a fully transparent cell is treated as white. That is why the empty area around a transparent PNG logo does not fill up with @.

Brightness is the weighted sum 0.2126 R + 0.7152 G + 0.0722 B, the Rec. 709 luma weights, applied to the gamma-encoded values without linearizing. For picking characters only the ordering matters, so this shortcut is harmless. Hazy photos bunch their brightness in the middle and never reach either end of the ramp; auto contrast trims the darkest and lightest 2% and stretches the rest to 0 to 255. Gamma above 1 darkens midtones, below 1 lightens them.

Choosing a column count

Classic terminals are 80 columns wide, which is also a sensible limit for README files and code comments. Around 120 columns is enough for a recognizable face. Past 200 the output starts reading as a halftone photo rather than as text art, and ultra mode, which spends several characters per source pixel, is meant for large rendered PNGs rather than pasting.

Worked examples

Row count

Input
1920×1080 image, 120 columns, aspect 0.55
Output
120 × 37 grid

120 × (1080/1920) × 0.55 = 37.1, rounded to 37. Without correction (1.0) you would get 68 rows and a picture stretched about 1.8 times vertically.

Brightness to character (10-step ramp, no invert)

Input
Brightness 255, 200, 30, 0
Output
space, :, %, @

The index is the integer part of (255 − brightness)/255 × 10. 200 gives 2.16, so ":"; 30 gives 8.82, so "%"; 0 gives 10, clamped to the last entry, "@".

What auto contrast does

Input
Cell brightness 60; the 2nd and 98th percentiles are 40 and 200
Output
"#" becomes "%"

(60 − 40)/(200 − 40) × 255 = 31.9, so the cell gets a denser character. Shadows deepen by a step and outlines sharpen.

How to use it

  1. Drop or choose an image.
  2. Pick the column count and character set; turn on Invert for dark backgrounds.
  3. Fix proportions with the character aspect ratio, and flat images with auto contrast or gamma.
  4. Copy the text or save it as TXT or PNG.

Frequently asked questions

It falls apart when I paste it into a chat app.

Without a monospace font every character has a different width. Wrap it in a code block (```) or share the PNG instead.

Does color mode survive copy and paste?

No. Plain text has no color, so only the characters are copied. Save as PNG to keep the colors.

Why does my image look like a negative?

You are viewing light-on-dark output with the default dark-on-light mapping, or the reverse. Toggle Invert.

Can I use my own characters?

Yes. Enter them from lightest to darkest. At least two characters are needed; otherwise the tool falls back to the standard ramp.

Sources

Last reviewed:

Privacy and how data is handled