Image to ASCII Art
Convert any image to ASCII text art — adjustable width, character sets, and invert
Drop an image here or click to upload
JPEG, PNG, GIF, WebP, SVG
ASCII art has been a form of visual expression since the early days of computing — long before high-resolution displays, before GIF animations, before emoji. A photograph converted to text characters and dropped into a terminal, a README, or an email signature is a deliberately lo-fi aesthetic choice that stands out precisely because of its constraints.
A Brief History of ASCII Art
ASCII art originated in the 1960s with typewriter art, where typists composed images by overlapping characters in clever patterns. The tradition moved to computers in the 1970s as early systems used line printers and text-only terminals. By the 1980s, ASCII art was a staple of bulletin board systems (BBS) and Usenet. The demo scene of the late 1980s and 1990s elevated it to an art form, with artists like Joan Stark creating intricate portraits using only the 95 printable ASCII characters.
The aalib library (1997) and later libcaca made programmatic ASCII art generation accessible. Tools like jp2a and img2txt brought it to Unix command lines. Today it’s alive in terminal dashboards, code comments, and developer humor.
How Brightness Mapping Works
The core principle is simple: map pixel brightness to character “density.”
ASCII characters have different visual weights when rendered in a monospace font. A space character is nearly invisible — effectively white space. The @ character is dense and dark. Between them, characters like ., :, =, *, and # fill progressively more of their cell.
The conversion algorithm:
- Sample pixels — for each character position, identify the corresponding pixel in the source image
- Compute brightness — convert RGB to a single luminance value using the perceptual formula:
brightness = 0.299R + 0.587G + 0.114B - Map to character — scale the brightness (0.0–1.0) to an index in the character set
- Assemble lines — join characters into rows and rows into the final text
The character aspect ratio (characters are taller than wide, roughly 2:1) means you need approximately half as many rows as columns to preserve proportions. This tool compensates automatically.
Character Sets and Their Uses
Standard ( .:-=+*#%@) — 10 characters covering the full brightness range. Clean and readable at any width. Best for general use, documentation, and README files.
Detailed (70+ characters) — Fine-grained brightness steps for higher fidelity. Better for wide outputs (120+ chars) where you want subtle shading. Requires a small font to display correctly.
Block (░▒▓█) — Unicode block elements create a different aesthetic closer to pixel art. Works well for bold, high-contrast images and terminal art.
Width: The Key Variable
Width (in characters) determines detail and file size. At 80 characters — the classic terminal width — a face is recognizable but abstract. At 160, details emerge. At 40, it’s iconic and rough.
General guidelines:
- 40–60 chars — minimal, iconic. Good for logos, simple shapes
- 80 chars — classic terminal width, the default, works for most photos
- 120 chars — high detail, good for portraits
- 160–200 chars — very high detail, only practical at very small font sizes
Invert for Dark Backgrounds
Standard character sets map dark pixels to dense characters. This works for black text on a white background (like a printed document or a default terminal). But if you’re displaying ASCII art on a dark terminal or a dark-mode website, you want the opposite: dense characters for bright areas, spaces for dark areas. The invert toggle reverses the brightness-to-character mapping.
Use Cases
GitHub and GitLab READMEs — Drop ASCII art into code blocks in your README for a visual header without depending on external image hosting.
Terminal dashboards — ASCII art displayed by neofetch, cmatrix, or custom shell scripts. Lightweight, no image rendering required.
Code comments — A small ASCII portrait or logo embedded in source code as a block comment.
Email signatures — Plain text email clients strip HTML and images. ASCII art remains intact as plain text.
Slack and Discord — In code blocks (triple backtick), monospace ASCII art renders correctly.
Frequently Asked Questions
Why does my ASCII art look squished or stretched? The tool applies a 0.5 aspect ratio correction (characters are roughly twice as tall as wide), but your final rendering depends on font metrics. If the output looks wrong in your terminal or editor, try adjusting the aspect ratio by reducing width until proportions look correct.
What’s the best width for a portrait photo? 80–120 characters produces good results for faces. Use the detailed character set for more nuance. Enable invert if you’re displaying on a dark background.
Does this tool support color output?
The current tool outputs plain text ASCII art (monochrome). For colored HTML ASCII art, libcaca and similar libraries produce HTML with colored <span> elements, but that output is not suitable for terminal or README use.
Can I use the output commercially? The ASCII art is generated from your image using an algorithm — it’s your output. There are no restrictions on how you use the generated text.
Why do block characters look different in some editors?
Block characters (░▒▓█) are Unicode and require a font that supports them. Most modern monospace fonts (JetBrains Mono, Fira Code, Cascadia Code, Menlo, Consolas) include them. Some older or minimal fonts may substitute boxes or question marks.