User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
0, 080 × 30Pencil

Import ASCII Art

Enter Text

Is this tool helpful?

Your feedback helps us improve.

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

About

ASCII art encodes visual information within a fixed-width character grid, typically 80ร—40 cells. Each cell maps to a single glyph from the printable ASCII range (0x20 - 0x7E). The visual density of a character determines its perceived brightness: @ registers as near-black while . reads as near-white. Getting character density wrong collapses contrast and produces unreadable output. This editor provides Bresenham-based line rasterization, BFS flood fill, and rectangular selection so you work at the glyph level without guessing pixel alignment. Grid state persists to LocalStorage automatically.

The tool approximates a bitmap editor but operates in discrete character space. Diagonal lines exhibit staircase artifacts inherent to low-resolution grids. For best results, work at grid widths above 60 columns and use high-density characters (#, @, M) for foreground and low-density characters (., ยท, ) for background. Export assumes a monospace font at 12px line height.

ascii art text art ascii editor ascii drawing text art generator ascii art maker character art

Formulas

The editor uses Bresenham's line algorithm to rasterize straight lines between two grid coordinates. Given start point (x0, y0) and end point (x1, y1), the algorithm steps through the major axis and accumulates error to decide when to step on the minor axis.

dx = |x1 โˆ’ x0|
dy = โˆ’|y1 โˆ’ y0|
err = dx + dy
Loop: if 2err โ‰ฅ dy โ†’ err += dy, x += sx
if 2err โ‰ค dx โ†’ err += dx, y += sy

The flood fill uses Breadth-First Search. Starting from cell (x, y), it enqueues all 4-connected neighbors that match the target character and replaces them with the fill character. Worst-case time complexity is O(W ร— H) where W and H are grid width and height.

Where dx = horizontal distance, dy = vertical distance, err = accumulated error, sx = step direction on x-axis (+1 or โˆ’1), sy = step direction on y-axis.

Reference Data

CharacterHex CodeRelative DensityCommon Use
@0x400.95Maximum fill / dark regions
#0x230.90Walls, borders, dense fill
M0x4D0.85Heavy shading
W0x570.83Heavy shading alternate
%0x250.70Medium-dark texture
&0x260.68Medium shading
*0x2A0.50Stars, medium fill
+0x2B0.40Crosshairs, joins
=0x3D0.38Horizontal lines, water
-0x2D0.25Horizontal lines
|0x7C0.25Vertical lines, pipes
/0x2F0.22Diagonal lines (right-leaning)
\0x5C0.22Diagonal lines (left-leaning)
:0x3A0.18Light vertical texture
;0x3B0.17Light texture
,0x2C0.10Very light shading
.0x2E0.08Minimal fill, highlights
`0x600.05Near-white accent
(space)0x200.00Empty / background
~0x7E0.30Water, waves
^0x5E0.15Mountains, carets
_0x5F0.12Underlines, ground
!0x210.30Exclamation, rain
"0x220.20Light texture pairs
'0x270.07Apostrophe, minimal mark

Frequently Asked Questions

Each printable ASCII character occupies identical cell space in a monospace font, but covers different amounts of that cell with ink. Characters like @ and # fill roughly 85-95% of the cell area, reading as dark. Characters like . and ` cover under 10%, reading as light. Contrast in ASCII art depends entirely on selecting characters with sufficient density difference - a minimum delta of 0.40 between foreground and background characters produces readable results at standard viewing distances.
ASCII art operates on a discrete grid where each cell is approximately twice as tall as it is wide (typical monospace aspect ratio of 1:2). Bresenham's algorithm places one character per step along the major axis, producing staircase patterns on diagonals. This is an inherent limitation of character-cell resolution. Using / and \ characters for 45-degree angles partially compensates because their visual slope matches the grid aspect ratio. For other angles, staircase artifacts are unavoidable without increasing grid resolution.
Terminal displays typically support 80 columns by 24 rows. Email-safe ASCII art should stay under 72 columns to avoid line wrapping. Forum signatures commonly use 60ร—10. For detailed artwork, 120ร—60 or larger provides enough resolution for recognizable portraits. The editor caps at 200ร—100 to maintain browser performance - DOM tables beyond that size cause noticeable input lag.
The BFS flood fill checks 4-connected neighbors (up, down, left, right - no diagonals). A region must be fully enclosed by characters different from the target character to contain the fill. A single gap in the boundary causes fill to leak through and flood the entire connected area. Diagonal gaps do NOT cause leaks since the algorithm only checks orthogonal neighbors. Always verify boundary continuity before applying fill to large regions.
Yes. Use the Import button to paste existing text. The editor parses the text line by line, mapping each character to its corresponding grid cell. Lines shorter than the grid width are padded with spaces. Lines exceeding the grid width are truncated. The grid automatically resizes to fit the imported content's dimensions, up to the maximum of 200ร—100 cells.
The history stack stores up to 100 snapshots. Each snapshot is a full deep copy of the grid array. At 200ร—100 grid dimensions, each snapshot consumes approximately 20 KB of memory, so the maximum history footprint is roughly 2 MB. When the stack exceeds 100 entries, the oldest snapshots are discarded. Redo history is cleared whenever a new edit is made after an undo operation.