Image to ASCII Art Converter
This converter rewrites a photo as text art: each pixel's brightness is measured and replaced by one of ten characters, from @ for the darkest areas to a space for the brightest. Everything runs inside your browser tab — the file is read locally with the FileReader API and never sent to a server. The output is plain selectable text, so you can copy it into a document, a code comment, or a chat window.
- PriceFree, no signup
- InputAny image file
- UploadNever — local
- OutputPlain text, 10 chars
Getting usable ASCII art from different sources
| Source image | How it turns out | What to set |
|---|---|---|
| Portrait photo | Facial edges survive; skin fills with texture | Detail 150–200 |
| High-contrast logo | Cleanest possible result | Detail 80–120 |
| Landscape with big skies | Smooth gradients band into stripes | Higher Detail value |
| Screenshot of body text | Unreadable mush — wrong tool | Use the OCR tool instead |
| Transparent PNG | A solid block of @ characters | Flatten onto a background first |
| Art for chat or email | Spaces collapse and it scrambles | Paste into a monospace code block |
Upload your photo to convert to ASCII art
How the conversion actually works
The tool does three things in sequence. Everything you see in the output is a direct consequence of these three steps, and knowing them makes the results far easier to control.
Step 1: shrink the photo to character resolution
Your image is drawn onto an offscreen canvas whose width equals the Detail value. The height is
derived from the image's own aspect ratio: height = round(detail × imageHeight ÷ imageWidth ÷ 2).
That canvas is never added to the page — it exists only long enough to be read back pixel by pixel.
Step 2: measure the brightness of each cell
For every pixel the script pulls the red, green and blue channels and combines them with
0.299 R + 0.587 G + 0.114 B. This is ITU-R BT.601 luma, the same weighting broadcast
television used for black-and-white sets. The weights are not arbitrary: human vision resolves
green detail far better than blue, so green carries more than half the total weight and blue barely
a ninth. Two colours with the same luma — a saturated red and a mid grey, for instance — will
produce the same character.
Step 3: map luma to a character
The ramp is exactly ten characters: @%#*+=-:. — ordered from the densest glyph to
an empty space. The lookup is index = floor(luma ÷ 256 × 10). A pixel at the black end
lands on @; a pixel at pure white lands on the space. Nothing else influences the
character choice: not hue, not saturation, not alpha.
Why the text comes out half as tall
In a typical monospace font the character cell is roughly twice as tall as it is wide — an 8 by 16 pixel cell is standard. If the script kept the image's true proportions, every circle would come out as a tall ellipse. Dividing the row count by two compensates for that cell shape, which is why a perfectly square photo produces text that looks square on screen even though the character grid is not.
The practical consequence: if you change the font of the result, you also change the aspect ratio of the picture. The art is only geometrically correct in a font whose characters are twice as tall as they are wide, and at a line-height equal to the font size.
What ten characters can and cannot show
Ten steps means the full 0–255 brightness range is squeezed into ten buckets, so smooth gradients turn into visible bands. That is a deliberate trade: these ten characters exist in essentially every font, every terminal, every chat app, and they all share the same advance width. Heavier ramps built from Unicode block elements such as █ ▓ ▒ ░ can render smoother gradients, but they break alignment in fonts that lack them or fall back to a proportional glyph — and misaligned art is unreadable art.
If a portrait looks muddy, the usual cause is not the ramp but the source: low-contrast photos collapse several neighbouring brightness levels into the same character. Raising contrast or converting to grayscale first, in any editor, gives the ramp more distinct values to work with.
Choosing the Detail value
Detail sets the number of character columns, from 50 to 300. It is the single control that matters most.
- 50–80 — a thumbnail. Fast, readable on a phone, and short enough to paste into a chat message without being truncated.
- 100–150 — the default range. Enough columns to recognise a face or a building, still small enough to scroll in one screen.
- 200–300 — poster territory. Each character represents a single source pixel, so noise and JPEG artefacts become visible as scattered characters, and long outputs get heavy for the browser to lay out.
A rough size estimate: 150 columns by 100 rows is about 15,000 characters, which is roughly 15 KB of text. Most messaging apps truncate or split pastes far earlier than that, so if the destination is a chat window, stay near 80 columns or send a screenshot instead.
Known limits
- No colour. Only brightness is used, so a red apple and a green apple with the same luma become identical characters. There is no ANSI colour output.
- Transparency is treated as black. The alpha channel is ignored, and a fully
transparent pixel reports 0,0,0 — the darkest value — so a transparent PNG logo turns into a solid
block of
@characters. - Text only. The result is copied to the clipboard as plain text. To get a picture back, take a screenshot of the preview.
- Very large photos. Decoding a 50-megapixel image and reading it back costs memory; on older phones this can stall for a second or two. Downscaling first is quicker.
- Font dependence. Outside a monospace font with a 2:1 cell, the art shears. Pasted into a proportional-font chat, it looks scrambled.
Common mistakes
- Pasting straight into a chat app and concluding the tool is broken — the glyphs are fine, the font is not monospace. Screenshot the preview instead.
- Maxing out Detail on a noisy photo, then blaming the ramp for the speckle. Noise is per-pixel; more columns means more visible noise.
- Expecting a transparent background when converting a logo. Alpha is dropped, so transparent areas become solid dark characters.
- Converting a colour photo with heavy shadows and expecting detail there. Ten levels cannot resolve deep shadow; lift the shadows first.
Privacy
The file is read with FileReader, drawn to an in-memory canvas, and converted to a
string. No fetch, no XHR, no form submission — you can load the page, disconnect from the network,
and the converter still works. Nothing about your image reaches a server, which matters if the photo
is a document, an ID card, or anything you would not email to a stranger.
FAQ
No. Only brightness is measured — red, green and blue are collapsed into a single luma value before the character is chosen, so hue and saturation are discarded. Colour ASCII art needs ANSI escape codes or HTML spans, which this tool does not emit.
Because the alpha channel is ignored. A fully transparent pixel still reports RGB 0,0,0, which is the darkest possible value and therefore maps to @. Flatten the image onto white first if you want the transparent areas to come out as spaces.
Around 80 if the result is going into a chat message, 120–150 for reading on screen, and 250–300 only if you plan to zoom in or print. Higher values do not add real detail — they add one character per pixel, which also means one character per pixel of noise.
Not from this page; the tool copies plain text to the clipboard. If you need a picture, screenshot the preview area — that also preserves the exact font and spacing, which a copy-paste into another app would not.
Yes. Once the page has loaded, the conversion is pure JavaScript running on your machine. Disconnecting the network does not affect it.
There is no hard limit in the code, but the whole image is decoded into memory and read back through getImageData. Photos up to roughly 20 megapixels are comfortable on a modern phone; much larger files may stutter before the result appears.
Those apps render text in a proportional font, where an i is narrower than an m. The art was built for a fixed-width grid of twice-as-tall cells, so any proportional font shears it. Wrapping the text in a code block, or sending a screenshot, fixes it.