devShakib

Loading devShakib…

Image to ASCII

Turn any photo into ASCII art with adjustable density and inversion. Free, runs entirely in your browser — no signup, and nothing you paste in is uploaded.

Converting an image to ASCII is sampling brightness into a ramp of characters ordered by how much ink they put on screen — a space is empty, `@` and `#` are dense. Each character covers a block of pixels, so the output resolution is the character grid, not the image.

The correction that makes it look right is aspect ratio. Terminal cells are roughly twice as tall as they are wide, so sampling on a square grid produces art stretched vertically; the vertical sampling has to be halved. Inverting the ramp matters too, since dense characters read as dark on a light terminal and as light on a dark one.