Image to ASCII Art
runs in your browserTurn a photo or logo into ASCII art: choose the width in characters, a character set or your own, invert for dark screens, dither, then copy or save it.
A photo, logo or drawing; high contrast works best.
Drop a file here, or .
PNG, JPEG, WebP, GIF, AVIF, BMP or SVG. It is read here and never uploaded.
ASCII art
Drop an image, or try the sample, to see it drawn in characters.
about this tool
How a picture becomes characters
The picture is cut into a grid with one cell per character: as many columns
as you ask for, and half as many rows per column as a square grid would
have, because a character in a monospace font is about twice as tall as it
is wide. Each cell's darkness is averaged over its pixels and replaced by
the character with about that much ink, from a space for blank paper to
the densest character in the set, such as @. Transparent pixels count as paper, so a logo with no
background comes out with nothing around it.
The settings
- Width is the number of characters per line, from 8 to 400. Around 80 fits a terminal or a code comment; 150 or more shows detail but needs a wide window.
- Characters is the set used for the shades. Standard has ten, from
.:-=+*#%@. Detailed has seventy, from Paul Bourke's well-known ramp, for finer shading. Blocks uses the shade characters░▒▓█for a solid, pixel-like look. Custom takes your own, lightest first; each must be one column wide, so emoji and East Asian characters are refused. - For a dark background gives the bright parts the dense characters, for light text on a dark terminal. The preview turns dark to match.
- Dither passes each cell's rounding error to its neighbours, the Floyd–Steinberg way, so a short set shows gradients as a mix of characters rather than bands.
- Stretch contrast maps the picture's darkest and lightest parts (the 2nd and 98th percentiles, so a stray pixel does not count) to the two ends of the set. Turn it off to keep the picture's own brightness.
Using the result
Copy it, or save it as a .txt file named after the picture. Transparent
margins are cut off before the picture is measured, so a logo with no
background starts at its own edge, and blank lines above and below and
spaces at the ends of lines are left out; they are invisible and only get
in the way. Paste it somewhere with a monospace font, such as a code block, a
terminal or a README, or the columns will not line up.
Limits
A picture larger than 1200 pixels on its longer side is scaled down to that before it is measured, which is more than 400 columns ever need; an SVG is drawn at that size, being a vector, so a small icon stays sharp. A very tall, narrow picture is drawn narrower than asked, so it keeps its shape in at most 600 lines; a thin enough strip can come out narrower than 8 characters. Each pixel counts by its lightness alone, ignoring hue, so a red and a green of the same lightness become the same character. Stretch contrast multiplies differences by at most four, so a page that is nearly all one shade stays blank rather than turning faint noise into ink. Nothing is uploaded.
A busy background is the most common reason art comes out muddy; remove the background first, or raise the contrast with image filters.
questions
- Why does my ASCII art look stretched or squashed?
- A character in a monospace font is about twice as tall as it is wide, so the converter uses half as many rows as a square grid would. Pasted somewhere that is not monospace, the characters have different widths, so the columns drift and the picture distorts. Paste it into a code block, a terminal or a plain-text file shown in a monospace font. Extra line spacing has the opposite effect, stretching the picture taller.
- What does “for a dark background” do?
- It swaps which end of the picture gets the dense characters. On paper or a light editor, dark parts of the image become @ and # and light parts become spaces. In a terminal with light text on black, that comes out as a negative, so this option gives the bright parts the dense characters instead.
- What is dithering for?
- A short character set has only a few shades, so a smooth gradient turns into bands. Dithering passes each cell’s rounding error on to its neighbours (the Floyd–Steinberg method), so the shades in between appear as a mix of the two nearest characters. It helps most with the blocks set and short custom sets.
- Which pictures work best?
- Ones with a clear subject and strong contrast: a logo, a portrait against a plain background, a silhouette. Fine texture is lost at a hundred characters wide. Transparent areas stay blank, so a logo with its background removed comes out cleanly; the stretch contrast option spreads a dull photo across more of the characters, up to four times its own contrast.
- Is my image uploaded?
- No. The image is decoded and converted in your browser, and the text is made in the page. Nothing is sent anywhere and nothing is kept.