User Rating 0.0
Total Usage 0 times
Drop image here, click to browse, or paste from clipboard JPG, PNG, GIF, WebP, BMP • Max 10 MB
Is this tool helpful?

Your feedback helps us improve.

About

ASCII art generation maps pixel luminance values to typographic glyphs ordered by visual density. The conversion relies on the ITU-R BT.601 luma formula L = 0.299R + 0.587G + 0.114B to reduce each pixel block to a single brightness scalar, then selects a character whose ink-to-whitespace ratio approximates that scalar. Errors compound quickly: a poorly ordered character ramp produces muddy output, wrong aspect ratio correction distorts proportions, and naive downsampling destroys fine detail. This tool handles all three failure modes with block averaging that compensates for the ~2:1 height-to-width ratio of monospace glyphs.

The generator supports multiple character ramps from 10 to 70 density levels, optional Sobel edge detection for line-art style output, and per-character color preservation using the original pixel RGB values. Output widths range from 20 to 200 characters. Note: photographic images with subtle gradients require wider output and denser ramps to preserve tonal range. High-contrast logos and icons produce legible results even at 40 characters wide.

ascii art image to ascii text art ascii generator image converter ascii characters pixel art monospace art

Formulas

The core conversion maps pixel brightness to a character index in the density ramp.

L = 0.299 R + 0.587 G + 0.114 B

Where R, G, B are the red, green, and blue channel values in range [0, 255], and L is the resulting luminance in the same range.

i = floor(L255 (n 1))

Where i is the character index and n is the total number of characters in the ramp. For inverted mode, the index is reversed: i = (n 1) i.

Block averaging downsamples the image. Each output character represents a block of bw × bh pixels:

bw = Wcols , bh = bw 2

Where W is image width in pixels, cols is desired output character width, and the factor 2 corrects for monospace character aspect ratio (~1:2 width:height).

For edge detection mode, the Sobel operator computes gradient magnitude at each pixel:

G = Gx2 + Gy2

Where Gx and Gy are the horizontal and vertical convolution results of the 3×3 Sobel kernels applied to the grayscale image.

Reference Data

Character RampNameGlyph CountBest ForDensity Range
@%#*+=-:. Standard10General use, logosFull tonal
$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\|()1{}[]?-_+~<>i!lI;:,"^`'. Detailed70Photographs, portraitsHigh precision
#@+=- Simple6Small images, thumbnailsLow detail
█▓▒░ Blocks5Retro pixel artUniform steps
10 Binary3Silhouettes, high contrastTwo-tone
Aspect Ratio Correction
ParameterTypical ValueExplanation
Char width1.0 chHorizontal unit in monospace font
Char height~2.0 chLine-height makes chars taller than wide
Correction factor0.5Sample half as many rows as columns
Luminance Coefficients (ITU-R BT.601)
Red weight0.299Human eye red sensitivity
Green weight0.587Dominant perceptual channel
Blue weight0.114Lowest eye sensitivity
Sobel Kernels
Gx[-1,0,1; -2,0,2; -1,0,1]Horizontal gradient
Gy[-1,-2,-1; 0,0,0; 1,2,1]Vertical gradient
MagnitudeGx2 + Gy2Edge strength per pixel
Recommended Output Widths
Icons / Emojis20 - 40 charsSimple shapes
Logos60 - 80 charsMedium detail
Photographs100 - 150 charsTonal gradients
High detail150 - 200 charsMaximum fidelity

Frequently Asked Questions

Monospace font characters are approximately twice as tall as they are wide. The generator compensates by sampling pixel blocks at a 1:2 width-to-height ratio. If you paste the output into a non-monospace font context or a text editor with non-standard line height, proportions will distort. Always display ASCII art in a monospace font (Courier, Consolas, monospace) with line-height set to approximately 1.0.
Photographs contain smooth tonal gradients requiring many density levels. Use the Detailed ramp with 70 characters and output width of 120+ characters. Logos and icons are high-contrast with few tones - the Standard (10 chars) or Simple (6 chars) ramp at 60-80 width produces cleaner results. The Blocks ramp using Unicode block elements (█▓▒░) works well for retro pixel-art aesthetics.
Standard mode maps pixel brightness directly to character density - dark areas get dense characters like @ and light areas get sparse ones like periods. Edge detection applies a Sobel convolution to detect boundaries between regions, producing line-art style output where only contours are drawn. This works best for images with strong outlines (cartoons, architecture) and poorly for photographs with soft gradients.
Beyond approximately 200 characters wide, the character grid becomes too dense to perceive patterns at normal viewing distance. The effective resolution is also limited by your source image - converting a 200-pixel-wide image to 200-character width means each character represents a single pixel column, which is the theoretical maximum. For most images between 500 and 2000 pixels wide, output widths of 80 to 150 characters hit the optimal balance between detail and readability.
No. Colored output uses inline HTML span elements with CSS color properties. It renders correctly only in HTML contexts (web pages, HTML emails, rich-text editors that support HTML). When you download as .txt, the file contains plain characters only with no color data. Use the Download HTML option to preserve colors. The HTML file is self-contained with inline styles and a monospace font declaration.
Three common causes: (1) The source image lacks contrast - preprocess with brightness/contrast adjustment before converting. (2) The output width is too narrow for the level of detail - increase to 100+ characters. (3) The subject occupies a small portion of the frame with large uniform backgrounds - crop the image tightly around the subject before upload. ASCII art fundamentally reduces information by orders of magnitude, so input image quality directly determines output legibility.