Understanding ASCII Character Density
Every character in a ramp stands for a band of brightness. Below, the same gradient and the same shaded sphere go through four ramps, so you can see what ordering and weight do before you edit your own.
12 minute read · Intermediate
Copied art losing alignment? Compare ASCII, Unicode blocks and font widths.
What character density means
Density is how much of a character's cell is covered by ink. @ fills much of its cell, . covers a few pixels and a space covers none. Dark text on a light page makes heavy characters read as dark tones and light characters as highlights.
In Standard ASCII Art mode, the first character maps to dark source pixels and the last to light pixels. The default ramp is @%#*+=-:. , including its trailing space. The converter computes brightness as 0.299 × red + 0.587 × green + 0.114 × blue, then picks the character at position round(brightness ÷ 255 × (length − 1)). A ten-character ramp therefore splits the range 0–255 into ten roughly equal bands.
Ink coverage is not a fixed property of a character: the font, size and colors change it. Light text on a dark terminal reverses the effect, because heavy characters then read as bright. Use Invert Colors to reverse the source mapping for that case.
One gradient, four ramps
The source is a 60-pixel strip from black on the left to white on the right. Each row below is the output of the same Standard-mode function the editor runs, with neutral settings and no dithering. Only the ramp changes.
Standard: "@%#*+=-:. "
@@@@%%%%%%#######*******++++++======-------:::::::......
Ten steps from heavy to empty. The default preset.
Binary: "10 "
111111111111111000000000000000000000000000000
Three steps. Midtones collapse into 1 or 0.
Similar weights: "@#%&$ "
@@@@@@############%%%%%%%%%%%%&&&&&&&&&&&&$$$$$$$$$$$$
Five heavy symbols, then a space. Most tones look the same.
Reversed order: " .:-=+*#%@"
......:::::::-------======++++++*******#######%%%%%%@@@@
The same characters listed light first. Shadows and highlights swap.
The same ramps on a shaded sphere
A gradient shows the bands; a shape shows whether a viewer can still read form. This 40 × 18 source is a sphere lit from the upper left on a white background, computed in code with one pixel per output cell and passed through the same function. It is a synthetic test, not a photograph. The worked small-ASCII lesson repeats the comparison on a real print, at two widths and with a crop.
-----=
::::::::-----====+
:::::::::::::-----====++**
:::::::::::::::-----====+++**#
:::::::::::::::------====+++**##
-:::::::::::::::------====+++***##%%
-::::::::::::-------=====++++***##%%
---::::::::--------=====++++****##%%%%
-----------------======++++****###%%%%
==-----------=======+++++****###%%%%%%
=================++++++****####%%%%%%%
++==========+++++++*****####%%%%%%%%
*++++++++++++++******#####%%%%%%%%%%
****************#####%%%%%%%%%%%
##******########%%%%%%%%%%%%%%
%%######%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%
%%%%%% 000000
000000000000
000000000000000
00000000000000001
0000000000000000001
0 0000000000000000000111
00 0000000000000000000001111
00000000000000000000000000000000011111
00000000000000000000000000000001111111
00000000000000000000000000000011111111
00000000000000000000000000001111111111
000000000000000000000000011111111111
000000000000000000000001111111111111
00000000000000000111111111111111
100000000001111111111111111111
11111111111111111111111111
111111111111111111
111111 &&&&&&
$$$$$$$$$$&&&&&&&%
$$$$$$$$$$$$$$&&&&&&&&%%%%
$$$$$$$$$$$$$$$$&&&&&&&&%%%%%#
$$$$$$$$$$$$$$$$&&&&&&&&&%%%%%##
$$$$$$$$$$$$$$$$$&&&&&&&&&%%%%%%###@
$$$$$$$$$$$$$$$&&&&&&&&&&%%%%%%####@
&&$$$$$$$$$$$&&&&&&&&&&&%%%%%%%#####@@
&&&&&&$&&&&&&&&&&&&&&&&%%%%%%%#####@@@
&&&&&&&&&&&&&&&&&&&&%%%%%%%%######@@@@
&&&&&&&&&&&&&&&&&%%%%%%%%%%######@@@@@
%%&&&&&&&&&&%%%%%%%%%%%#######@@@@@@
%%%%%%%%%%%%%%%%%%%%########@@@@@@@@
%%%%%%%%%%%%%%#########@@@@@@@@@
###################@@@@@@@@@@@
#############@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@
@@@@@@ @@@@@@@@@@@@@@@@@*****+@@@@@@@@@@@@@@@@@ @@@@@@@@@@@########*****++++=@@@@@@@@@@@ @@@@@@@#############*****++++==--@@@@@@@ @@@@@###############*****++++===--:@@@@@ @@@@###############******++++===--::@@@@ @@*###############******++++===---::..@@ @@*############*******+++++====---::..@@ @***########********+++++====----::....@ @*****************++++++====----:::....@ @++***********+++++++=====----:::......@ @+++++++++++++++++======----::::.......@ @@==++++++++++=======-----::::........@@ @@-==============------:::::..........@@ @@@@----------------:::::...........@@@@ @@@@@::------::::::::..............@@@@@ @@@@@@@..::::::..................@@@@@@@ @@@@@@@@@@@..................@@@@@@@@@@@ @@@@@@@@@@@@@@@@@......@@@@@@@@@@@@@@@@@
Ordering a custom ramp
Edit Character Set in Options to change the ordered ramp. There is no separate density slider or per-tone mapping editor; the order and length of the characters are the whole mapping.
- Darkest first. Listing light characters first produces the negative shown above.
- End with a space if white areas should stay empty. Without it, the lightest tone is still a visible character.
- Pick visibly different weights. Neighbors such as
@,#and%merge into one tone in most fonts. - Repeat a character to widen its band.
@@%#*+=-:.spends two of eleven slots on@, so more of the shadows use it. - Length adds tones, not detail. Output Width sets how many cells describe the picture; a longer ramp only splits brightness more finely.
To build a strict ASCII palette, use the ASCII code table and character ramp builder. Append printable symbols in your chosen order, preview the Standard mapping and copy the raw ramp into Character Set.
Built-in presets compared
| Preset | Characters | When to try it |
|---|---|---|
| Standard | @%#*+=-:. | The default. Ten steps with clearly different weights; plain ASCII. |
| Simple | #@%*+=-:. | The same ten symbols with # first. Compare it with Standard in your display font. |
| Detailed | $@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\|()1{}[]?-_+~<>i!lI;:,"^`'. | About 70 printable ASCII symbols. More tone bands, but neighboring characters are close in weight. |
| Binary | 10 | Three steps. A deliberate poster look; midtones disappear. |
| Blocks | █▓▒░ | Five Unicode shade blocks. Smooth on screen, but not ASCII and not equally wide in every font. |
Lines, Minimal, Dots, Shapes and Arrows are Unicode sets that are not ordered by ink weight. Use them for texture or a graphic look, not for smooth shading.
ASCII vs Unicode: why copied art can lose alignment
For a README or terminal you do not control, start with printable ASCII, a monospace font and preserved spaces. Unicode blocks can make a smooth-looking image, but copying the same symbols does not copy their font or display width. Neither choice prevents a narrow destination from wrapping.
Printable ASCII is the space-through-tilde range, U+0020 through U+007E. Symbols such as █ and emoji are Unicode outside that range, even when described casually as ASCII art. ASCII characters are also encoded in Unicode; this is a choice of symbols, not a choice between text encodings. The Standard preset uses printable ASCII. Blocks, Minimal and the emoji mosaic do not. The older density scale above mixes these categories.
Same source pixels, two different ramps
This uses the original three-band, 30 × 12 PNG from our colored-output lesson, not another site's art. Both plain-text results below run the production Standard converter at 30 columns and 7 rows. Brightness, contrast and saturation are 100%; hue and sepia are 0; inversion is off and dithering is None. Only the character ramp changes.
View the original three-band PNGRamp, dark source to light: @%#*+=-:. (final space included).
********************########## ********************########## ********************########## ********************########## ********************########## ********************########## ********************##########Open the Standard sample in the editor
Ramp, dark source to light: █▓▒░ (final space included).
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓Open the Blocks sample in the editor
Standard distinguishes the blue band with #; red and green both become *. All three bands become ▓ in Blocks: its shorter ramp maps their different luminances to the same symbol. A denser-looking character is not automatically more detail. These are exact production mappings of opaque flat colors, not a promise that resized photographs match across image decoders.
Open either sample, check Result, then use Copy, Copy as Markdown or Download TXT. The exported symbols and spaces should match that result; their appearance in the receiving app is a separate check. Use colored HTML if you need foreground colors: plain Copy and TXT carry none.
Test the font, not just the character count
Each ruler row below contains eight interior symbols. The first two use only ASCII; the third uses full blocks; the fourth uses smiling-face emoji. The emoji row has eight grapheme clusters inside its borders, but that does not make it eight terminal cells or eight ASCII bytes. This specimen is a width diagnostic, not converter output.
|iiiiiiii| |WWWWWWWW| |████████| |🙂🙂🙂🙂🙂🙂🙂🙂|
|iiiiiiii| |WWWWWWWW| |████████| |🙂🙂🙂🙂🙂🙂🙂🙂|
With a fixed-pitch Latin font, the ASCII borders should line up. In a proportional font, repeated i and W usually occupy different widths. Blocks may come from a fallback font; emoji often use a separate color font and can occupy more space. Your system may render some rows equally: that does not establish compatibility on someone else's device.
The spark project documents irregular blocks from font fallback. Unicode's East Asian Width annex also distinguishes narrow, wide and context-dependent characters; that property is not a universal pixel-width calculator for browsers or terminals. Counting UTF-16 units, code points or graphemes alone cannot verify an aligned rendered grid.
Measured example: ten symbols, two widths
Each ruler row above has ten grapheme clusters, including its two borders. In one controlled run, the emoji row was more than twice as wide as the ASCII rows. A monospace setting did not give every symbol the same width.
Recorded November 1, 2026 in Chrome 141.0.7390.54 on Windows, at 16px with CSS monospace. Chrome reported Consolas for the ASCII, blocks and borders, and Segoe UI Emoji for the faces. These are saved observations, not measurements of your device.
| Ruler row | Width (CSS px) | Lines in 120px |
|---|---|---|
| ASCII i | 87.97 | 1 |
| ASCII W | 87.97 | 1 |
| Full blocks | 87.97 | 1 |
| Smiling emoji | 193.34 | 2 |

How to interpret this test
We measured each unwrapped row in the browser and with Canvas measureText; their widths agreed. For the wrapping column, we used a 120px content box with white-space: pre-wrap, overflow-wrap: anywhere and 24px line height. The emoji row occupied two lines; the other rows occupied one. This is a controlled width test, not a Discord preview or a recommended phone width.
The production PNG renderer measured the whole unwrapped text before drawing it. Its scheduled and synchronous paths produced identical pixels, and encoding then decoding the PNG preserved those pixels. That verifies this export, not alignment in other fonts, operating systems or terminals.
If columns must line up, inspect the text in the actual destination and replace mixed-width symbols when necessary. Use PNG when you want to keep an appearance you have already checked, not to fix uneven columns automatically. The live rulers above may look different on your device; the downloaded PNG records this particular run.
A short sharing check before you send
- Keep the whole result, including leading and trailing spaces and line breaks. Use a fenced code block where supported. Do not convert padding to tabs: tab stops can differ between apps.
- Preview the destination in a monospace style. Compare the left and right borders of the ruler and the actual art; check emoji and block rows separately. A code fence requests preformatted text, not one guaranteed font.
- Check the narrowest receiving viewport. If a line wraps, generate fewer columns or use a tighter source crop. Fewer symbols in the ramp do not reduce the number of columns.
- Reopen the saved TXT or rendered Markdown and inspect it again. Save Unicode output as UTF-8 where your editor offers an encoding choice. Missing-glyph boxes indicate font coverage; garbled characters may indicate an encoding problem. Neither is repaired by adding spaces.
- If the app strips whitespace or cannot preserve glyph widths, use the editor's PNG export and inspect that image. PNG preserves that rendered appearance, not editable/selectable text; include a useful description for readers who cannot see it.
For numeric comparisons, the worked README chart lesson keeps the scale and exact values with its ASCII bars. For image detail at a smaller width, use the crop and width comparison. These solve different problems from font coverage.
Check a ramp before you share
- Generate the same image with Standard and with your ramp, changing nothing else.
- Look at the largest flat area. If it turned into noise, your ramp has too many similar weights.
- Look at the brightest area. If it is a solid character, add a trailing space or move the light characters to the end.
- Paste the text into the destination with its real font and background. If it looks like a negative there, turn on Invert Colors.
Related guides
Convert a photo to ASCII art
Compare widths, a crop and a three-level ramp on a real print.
ASCII picture width guide
See how many columns a picture needs before choosing a ramp.
Try a ramp on your own image
Open Options, edit Character Set and generate again to compare.