About Image to ASCII Art
Make a banner for a README, a signature for a terminal or a retro version of a photo. Choose an image and it is redrawn in text: classic ASCII characters, Unicode shading blocks, or a coloured HTML page in which every character keeps the colour of that part of the picture.
Set the width in characters; the number of lines follows from the picture’s shape, allowing for characters being about twice as tall as they are wide. Turn on Light on dark when the art will be shown on a black background, such as a terminal. Copy the result and paste it wherever a monospaced font is used.
How it works
- The image is decoded by your browser the right way up; for an animated file the first frame is used.
- It is scaled down so each character cell covers a block of pixels, and each cell takes the average colour of its block, with transparent areas shown as the page colour.
- Brightness (Rec. 709 luma) picks a character from a ramp running from a space to @, or from a space to a solid block. Darker areas get denser characters, or lighter ones with Light on dark.
- In HTML mode each run of characters of one colour is wrapped in a span, with colours rounded to 4,096 shades so the page stays small.
Questions
Why does my art look stretched or squashed?
Text art only keeps its shape in a monospaced font with no extra line spacing. Paste it into a code block, a terminal or a plain-text editor set to a monospaced font.
How wide can the art be?
From 10 to 240 characters per line, and never more characters than the picture has pixels across. At most 400 lines are made; a very tall picture is drawn narrower to fit.
Which style should I choose?
Characters works everywhere, including email and old terminals. Shading blocks gives smoother tones but needs a font with the Unicode block characters. Coloured HTML keeps the colours but has to be opened as a web page.
Can I download the result?
Use the copy button and paste the text into a file. For the HTML style, save it in a file ending in .html and open that in a browser.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.