Skip to main content

Image to ASCII Art

Convert images to ASCII art using text characters with adjustable width and brightness.

Reviewed by · Last reviewed

Aa

Drop an image here or click to upload

Convert your image to ASCII art

How to Use the ASCII Art Generator

  1. Drop an image into the uploader. Portraits and high-contrast subjects with clear silhouettes work best; busy landscapes tend to blur into texture noise.
  2. Set the character width between 20 and 200. The width is how many ASCII characters wide the output will be, and it also drives the effective resolution of the art.
  3. Toggle "Invert Brightness" if you plan to display the result on a dark background. Without inversion, dense characters represent dark pixels - fine on white terminals, inverted on dark ones.
  4. Wait for the render. For each output cell, the tool samples the corresponding block of source pixels, averages their luminance, and picks a character from a ramp.
  5. Copy the ASCII text with the copy button, or download a .txt file. Paste it into a monospace-font context (README, terminal, code comment) to keep the proportions right.

How Luminance Becomes Characters

The tool loads the image onto a hidden canvas, calls ctx.getImageData to read the raw RGBA pixel buffer, and then samples it on a grid. For each grid cell (one character in the output) we compute an average luminance using the ITU-R BT.601 weighting: Y = 0.299*R + 0.587*G + 0.114*B. That weighting reflects how human vision perceives green as brighter than red and red brighter than blue - a simple RGB average would give unnaturally dark reds and bright greens.

The luminance value (0 to 255) is then mapped to an index into a ramp of characters ordered by visual density - something like " .,:;ox%#@" for a dark-on-light ramp, reversed for the inverted case. The widest character (typically "@" or "#") fills more ink, the narrowest (space) is empty. Critically, we compensate for the fact that monospace characters are typically twice as tall as they are wide: the sampling grid is stretched vertically so each character cell corresponds to a roughly 1:2 horizontal:vertical ratio in the source image, keeping the output proportional.

Where ASCII Art Still Belongs

  • README banner art for an open-source project, displayed on GitHub where proportional rendering is guaranteed.
  • Custom MOTD messages on a personal server, greeting SSH logins with a pet portrait.
  • Code comment decorations separating logical sections of a large file with a recognizable motif.
  • Terminal-based games, dashboards, or CLI splash screens where Unicode is unreliable but ASCII is universal.
  • Retro-style social media posts in monospace-friendly channels like Mastodon, Discord code blocks, or old-school forum signatures.
  • Printable nostalgia - dot-matrix-style ASCII portraits for greeting cards and handmade zines.

Pitfalls to Watch For

  • Character aspect ratio wrecks proportions. If you paste the output into a font where characters are nearly square (rare but possible in some web fonts), the image looks vertically squashed. Always display in a monospace font like Consolas, Menlo, or JetBrains Mono.
  • Color information is lost. The grayscale mapping discards hue, so a red tomato and a green tomato look identical. For color ASCII, tools like jp2a --colors output ANSI color escapes, but this tool stays in pure text.
  • Low-contrast images produce muddy output. If the source has little variation in brightness, most characters land in the middle of the ramp and the picture becomes a field of similar glyphs. Boost contrast in the source first.
  • Fine detail disappears at low widths. 40-character-wide ASCII can show a silhouette but not a face. Crank the width up for portraits; keep it low for iconic shapes like logos.
  • Line endings differ across platforms. The tool uses LF line endings. Pasting into a strict CRLF-expecting Windows context may misalign; use a modern text editor to normalize.

ASCII Art: A Short History

ASCII art predates personal computers. Teletype operators in the 1960s sent image-like messages using typewriter characters; the 7-bit ASCII standard (ANSI X3.4-1968, later ISO/IEC 646) gave them 95 printable characters including punctuation density grading from space through "@", perfectly suited to encoding grayscale. The BBS era in the 1980s saw ANSI art flourish - ASCII plus color escape codes and line-drawing characters from CP437. Modern revivals include ASCII fluid simulations, cowsay-style banners, and VT100 terminal dashboards like k9s and bottom. Projects like jp2a, aalib, and libcaca provide command-line ASCII image rendering; the last also supports ANSI color and Unicode block characters. Discord and Slack enforce monospace in their code-block renderers, which keeps the ASCII art tradition alive in 2026 chat.

Browser ASCII Art vs. Dedicated Tools

For a quick "drop an image, copy the output" flow, the browser is faster than any CLI. jp2a --width 80 photo.jpg produces cleaner output with configurable character ramps and optional ANSI color, and aview supports interactive zoom and pan over large images. libcaca-based tools like cacaview render Unicode box characters for higher visual fidelity than pure ASCII. For batch jobs or pipe-friendly workflows (rendering an image inside a git hook or a CI log), the CLI wins. Dedicated services like ascii-art-generator.org and asciiart.eu offer pre-built galleries of common subjects. Use this tool when you want a one-off rendering of your own image; pick up jp2a when you need scriptable output or color; visit the galleries when you want a ready-made classic like the Finnish reindeer or the Apple logo.

Frequently Asked Questions

How does the tool decide which character to use for each part of the image?

We compute per-cell average luminance using the ITU-R BT.601 formula (Y = 0.299R + 0.587G + 0.114B), then map that brightness into an index on a density-ordered character ramp. Bright pixels become sparse characters like space and period; dark pixels become dense ones like "@" and "#". The ramp order is reversed when you toggle "Invert Brightness" for dark-background display.

Why does my ASCII output look stretched vertically or horizontally?

Monospace characters are generally twice as tall as they are wide (roughly 1:2 aspect), so the sampling grid has to compensate. If you paste the output into a font where characters are more square than 1:2, the result looks squashed or stretched. Always display in a proper monospace font like Consolas, Menlo, JetBrains Mono, or SF Mono.

Can I get color ASCII art from this tool?

No, the output is pure ASCII text with no color codes. For color ASCII, command-line tools like <code>jp2a --colors</code> embed ANSI color escape sequences that render in color terminals. Alternatively, use Unicode block characters (half-blocks) with per-character foreground and background colors to get a higher visual fidelity per character cell.

Is my image uploaded anywhere during conversion?

No. The file is drawn into a local canvas and read via <code>ctx.getImageData</code>, then the luminance grid is computed in JavaScript inside your tab. No pixel data leaves the browser. The copy-to-clipboard and file-download actions use the local Clipboard API and a blob-URL anchor respectively, both fully local.

What width should I use for a portrait?

Portraits generally need more characters than landscape compositions because facial features (eyes, mouth) need a few characters each to register. Try 120-160 for recognizable portraits; 80 works if the face fills the frame tightly. For logos and icons with strong silhouettes, 40-60 is often plenty.

Why does the output look flat and undifferentiated?

Low-contrast source images pack most pixels into the middle of the brightness range, so most cells end up with the same ramp character. Increase contrast before converting - even a simple S-curve in any photo editor makes a big difference. High-contrast subjects (text, logos, silhouettes) always produce more readable ASCII than evenly lit photos.

Can I use this for a README banner on GitHub?

Yes, GitHub renders README markdown code blocks in a monospace font, which is exactly what ASCII art needs. Wrap the output in a <code>```</code> code fence in your README.md and the proportions will be preserved. Keep the width under 100 characters to avoid horizontal scrolling on mobile.

Does the tool preserve image aspect ratio?

Yes, as long as the display font is monospace. The sampling grid is computed from the source image dimensions and the chosen width, with a vertical compensation factor roughly equal to 2 to account for monospace character aspect. The ratio of characters-wide to lines-tall will match the source ratio within one line.

What image types work best for conversion?

High-contrast subjects with clear silhouettes work best: portraits against plain backgrounds, logos, simple illustrations, line drawings. Detailed landscapes and photos of foliage tend to produce visual noise because the ramp cannot represent subtle luminance differences. If you want to convert a complex photo, crop tightly around the main subject first.

Can I adjust the character ramp myself?

The current UI uses a fixed ramp tuned for readability on both light and dark backgrounds. Command-line tools like jp2a and aalib let you supply a custom character set, which is handy for stylistic effects (pure hash marks for a heavy look, only dots and spaces for a minimal look). For custom ramps, pipe the image through jp2a with <code>--chars " .-=#@"</code> or similar.

How is image-to-ASCII conversion different from a generic image-to-text tool?

Image-to-ASCII conversion produces a visual approximation of the source image rendered with text characters arranged on a grid. Image-to-text typically means OCR (optical character recognition), which extracts the textual content already shown in the image (street signs, document scans). The two tools sound similar but solve different problems. This page does the visual rendering; for OCR, use a Tesseract-based tool or a dedicated OCR service.

More Image Tools