User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Drop image here or click to upload JPEG, PNG, WebP, GIF, BMP, SVG
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

ANSI art maps pixel luminance to a ranked character ramp. Each cell in the output grid represents a block of pixels whose average brightness L is quantized into one of n printable glyphs ordered by visual density. Get the aspect correction wrong and faces stretch beyond recognition. Use a cell ratio factor near 0.5 because monospaced characters are roughly twice as tall as they are wide. This tool processes images entirely in your browser using the Canvas API. No data leaves your device. Results approximate the source image under the constraint of a fixed-width character grid. Fine detail below the cell resolution is lost to averaging.

Color ANSI output embeds per-character RGB values sampled from each cell's dominant color. This is useful for terminal emulators and HTML display but produces larger files. For plain-text contexts (README files, code comments, forum posts), grayscale mode with a high-contrast ramp yields the most legible results. Note: photographic images with smooth gradients convert better than vector graphics with hard edges unless you enable the edge-detection (Sobel) mode.

ansi art ascii art image to text character art text art generator pixel art image converter

Formulas

Each pixel block is reduced to a single luminance value using the ITU-R BT.601 weighted sum:

L = 0.299 โ‹… R + 0.587 โ‹… G + 0.114 โ‹… B

where R, G, B are the average red, green, and blue channel values within that cell (range 0 - 255).

The luminance is normalized and mapped to a character index:

i = floor(L255 โ‹… (n โˆ’ 1))

where n is the length of the character ramp. When inversion is enabled, L is replaced by 255 โˆ’ L.

Output row count is derived from the aspect-corrected dimensions:

rows = round(cols โ‹… hw โ‹… r)

where cols is the desired output width in characters, h and w are the source image dimensions, and r is the cell aspect ratio (typically 0.5).

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

G = โˆšGx2 + Gy2

where Gx and Gy are the horizontal and vertical convolution results of the 3ร—3 Sobel kernels applied to the luminance grid.

Reference Data

CharacterApproximate DensityBest For
(space)0%Brightest regions / background
.10%Highlights, skin tones
:20%Light midtones
-28%Soft gradients
=36%Mid-gray surfaces
+44%Textures, fabric
*52%Medium shadows
#65%Dark areas, hair
%80%Deep shadows
@95%Darkest regions, outlines
Extended Ramp (70 chars)
.'`^",:;Il!i><~+_-?][}{1)(|\/tfjrxnuvczXYUJCLQ0OZmwqpdbkhao*#MW&8%B@$
Common Output Widths
40 colsLow detailThumbnails, avatars, emoji-scale
80 colsStandardTerminal default, code comments
120 colsHigh detailWide terminals, print
160 colsVery highLarge displays, posters
200 colsMaximumFull-resolution art prints
Cell Aspect Ratios by Font
Courier New0.42Narrow cells, slight vertical stretch
Consolas0.48Near-ideal ratio
Monaco0.50Balanced square-ish mapping
Fira Code0.50Modern monospace, good density spread
Source Code Pro0.52Slightly wide, good for dense ramps

Frequently Asked Questions

Monospaced font characters are taller than they are wide. The cell aspect ratio r corrects for this by reducing the number of rows. The default 0.5 works for most fonts (Consolas, Fira Code). If your display font differs, adjust the ratio slider. Values below 0.5 compress vertically; values above expand it.
The standard ramp uses 10 characters sorted by visual ink density, giving roughly 10 tonal levels. The extended ramp uses 70 characters, providing finer gradation. Extended ramps produce smoother gradients in large-width outputs (120+ columns) but may look noisy at low widths because adjacent density levels become indistinguishable.
Color mode samples the average RGB of each pixel block and wraps the character in an inline style with that color. The HTML output renders correctly in browsers. For terminal use, you would need to convert these RGB values to ANSI 256-color or truecolor escape codes. This tool outputs HTML-colored text directly. Paste into any HTML context for full-color ASCII art.
The Sobel operator highlights sharp luminance transitions. Images with soft gradients (e.g., portraits with studio lighting) produce weak edge signals. Increase the output width to capture finer edges, or preprocess your image to boost contrast before uploading. High-contrast line art and architectural photos yield the best edge-mode results.
Any format the browser can decode: JPEG, PNG, GIF (first frame), WebP, BMP, SVG (rasterized), and AVIF in supported browsers. There is no hard size limit, but images above 4000ร—4000 pixels will take longer to process because the Canvas API reads every pixel. The output character count equals cols ร— rows, which can reach 40,000+ characters at 200 columns.
The generated text is a derivative of your input image. Copyright depends on the source image's license. The conversion algorithm itself imposes no restrictions. If you own the source image or it is public domain, the ASCII output is yours to use without limitation.