Text Art

ASCII art generator

█  █ ████ █    █     ██
█  █ █    █    █    █  █
████ ███  █    █    █  █
█  █ █    █    █    █  █
█  █ ████ ████ ████  ██

Made in your browser · nothing is uploaded

Local · monospace to line up, Rec. 601 luma for images

Two kinds of ASCII art in one page. Text becomes a five-row block banner, with any character the built-in font lacks left out and named rather than faked. An image becomes characters, a denser one for each darker area, with the row count halved so the result is not stretched.

How to use the ascii art generator

1 Pick which kind you want: a banner from text, or art from an image.
2 For a banner, type your text and choose the character to build it from.
3 For an image, choose a file, set the width in characters and pick a ramp; invert it for a dark terminal.
4 Copy the result, or save it as a text file.

The banner font here is five rows tall and built in, rather than loaded from a figlet file. That is a size decision: a real figlet font is tens of kilobytes for one typeface, and this page has a JavaScript budget to keep. Five rows is enough to be clearly legible in a terminal or a code comment, which is where these end up. Unsupported characters are dropped and named rather than substituted, because a question mark standing in for a missing glyph reads as though it were part of the text.

ASCII art in this sense goes back to teletypes, where the only way to make a heading was to type characters in the shape of letters. It survives because a plain-text file has no other way to emphasise anything, which is why you still find banners at the top of source files, in terminal splash screens and in the output of command-line tools.

The image side works the other way round. Each output character stands for one sampled pixel, and the character is chosen by brightness from a ramp running dark to light: @ for near-black through to a space for white. Brightness uses the Rec. 601 luma weights rather than an average of the three channels, because the eye is roughly six times more sensitive to green than to blue; a flat average makes blue regions come out far lighter than they look. The pixels are read back off a canvas in the page, so the photograph is never uploaded.

The correction that matters most on that side is aspect ratio. A character cell is about twice as tall as it is wide, so mapping one pixel per character makes everything twice as tall as it should be. Sampling half as many rows as columns fixes it, and it is the single most common thing missing from hand-written converters: the output looks stretched and nobody can quite say why. Inverting matters more than people expect too. The default ramp assumes dark characters on a light background, as on a printed page; paste that into a terminal with a dark theme and the image comes out as a photographic negative.

On what converts well: high contrast with a clear subject. A portrait against a plain background works beautifully at 80 characters wide. A busy landscape becomes noise at any width, because the technique has perhaps ten levels of brightness to work with against the 256 in the original.

A practical note on where both of them break. The output only lines up in a monospace font, where every character is the same width. Pasted into an email, a word processor or most chat apps it becomes a jumble, because those render in a proportional font where an M is wider than an i. Code comments, terminals, README files and anywhere marked as code will be fine.

What people use it for

  • Putting a banner heading at the top of a source file
  • Making a splash screen for a command-line tool
  • Writing a plain-text sign-off where no formatting is available
  • Turning a portrait into characters for a terminal profile or a README
  • Dropping a logo into a plain-text README where no image can be embedded

Questions

It is pasted into a proportional font. It only lines up in monospace; a terminal, a code block or a README.

FIGlet. The standard ASCII banner toolRFC 20: ASCII format for network interchangeITU-R BT.601, luma coefficients
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding