To convert an image to ASCII for a terminal, decode one still frame, generate text at a width from 10 to 200 characters, and copy or download that text for display in a monospace font.

Use Image To Ascii to perform that workflow locally in your browser. The result is visual ASCII art based on pixel luminance; it does not recognize or transcribe words already present in the picture.

convert image to ascii terminal
Convert Image to ASCII for Terminal Output

Convert the image into terminal text

  1. Select one source image. Open Image To Ascii and choose a PNG, JPEG, GIF, or WebP file. The encoded file can be at most 15 MiB. After decoding, either side can be at most 8,192 pixels, and the total decoded area can be at most 24 million pixels.
  2. Enter the terminal width. Choose a whole output width from 10 through 200 characters. Enter digits only, without a sign, unit, whitespace, decimal point, leading-zero form, or scientific notation. Optionally enable the reversed density ramp if light regions should receive dense characters.
  3. Generate and export the result. The complete character grid appears in the preview. Copy the visible text or download the local TXT file. The file contains only ASCII characters and newline separators, so it can be opened directly in a terminal or text editor.

If you change the source image, output width, or ramp direction, the previous result is cleared. Generate the art again after making a change so the preview and download match your current settings.

Display the result in a terminal

  1. Copy or save the output. For immediate display, copy the visible ASCII text and paste it into your terminal. For a reusable file, download the TXT version and give it a name such as image.txt.
  2. Open the downloaded file. In macOS or Linux Terminal, enter cat followed by the filename, such as cat image.txt. In Windows Command Prompt, use type image.txt. In PowerShell, use Get-Content followed by the file path.
  3. Check that rows do not wrap. Terminal text should appear in a monospace font. If a row extends beyond the visible terminal width, reduce the terminal font size or generate the art again at a narrower character width.
  4. Tune the line spacing. Use a tight line height when displaying the art. A font with unusually large line spacing can make the image look stretched vertically even though the downloaded characters and row breaks are unchanged.

The terminal displays characters rather than the original pixels, so exact proportions depend partly on the terminal font. The converter applies a practical aspect-ratio correction, but it cannot measure the line height or letter spacing used by every terminal application.

Match the ASCII grid to terminal columns

The output width is measured in characters per row, while the source dimensions are measured in pixels. A wider setting retains more horizontal detail but also requires more terminal columns. The most practical starting point is the largest width that fits on one line in the intended terminal.

The number of output rows is calculated as follows, with a minimum of one row:

rows = round(source height ÷ source width × output width × 0.5)

For a hypothetical 1,600 × 900 source image with an output width of 100, the calculation is round(900 ÷ 1,600 × 100 × 0.5), which produces 28 rows.

The 0.5 factor approximates a monospace character cell that is about twice as tall as it is wide. It is a preview approximation rather than a measurement of a particular terminal font. Zoom level, line height, letter spacing, and the terminal program can all affect the final appearance.

The complete serialized output must remain within 50,000 characters. Its size includes every character and every newline between rows. A very tall image can exceed that budget even when its selected width is within the accepted 10–200 range. The tool reports the limit rather than silently shortening the artwork.

Choose the character density direction

The converter uses a fixed ten-character density ramp that begins with @ and ends with a space. It does not retain the source colors. Reversing the ramp changes which tonal regions appear visually dense.

Source region Normal ramp Reversed ramp
Dark area Dense characters Sparse characters
Light area Sparse characters Dense characters

Transparent pixels are composited over a white background before luminance is calculated. Under the normal ramp, a fully transparent region therefore maps like white. The reverse setting assigns dense characters to those light regions instead.

Decode checks and size boundaries

Input or output rule Accepted value
Image formats PNG, JPEG, GIF, and WebP
Encoded file size 15 MiB maximum
Decoded side length 8,192 pixels maximum
Decoded area 24 million pixels maximum
Output width Plain base-10 whole number from 10 through 200
Complete text output 50,000 characters maximum, including newline separators

A matching extension or MIME type passes only the initial format screen. The browser must still decode the file successfully, so malformed content and unsupported codec profiles can fail during decoding even when the filename looks correct.

Decoded dimensions are checked independently of the output-width control. An unsupported or over-limit image clears any previous ASCII result and creates no partial preview or download. Likewise, an output that exceeds the character budget is rejected instead of being truncated.

What stays local and what the TXT contains

Decoding, resizing, pixel reading, luminance mapping, copying, and TXT creation all happen in the current browser tab. The source image, decoded pixels, generated characters, and filename are not uploaded to Lizely.

For an animated GIF, the converter works from one decoded still frame rather than preserving the animation. The source is resized into a Canvas whose dimensions match the planned character grid, and the browser performs the resampling. Its drawImage operation creates the resized frame, while getImageData operation supplies the RGBA samples used for character selection.

Alpha is composited over white, the sRGB channels are linearized, and relative luminance is calculated from the red, green, and blue channels. The result selects an entry from the fixed ramp. The mapping rules are fixed, although browser resampling can differ slightly between rendering engines, especially for detailed patterns or very large reductions.

The TXT output preserves characters and row breaks, not color, transparency, animation, metadata, camera information, layers, embedded profiles, or the original compressed image. Keep the source image when visual fidelity, metadata, transparency, or archival information matters.

Final terminal-output checklist

  • Confirm the image format, encoded size, decoded dimensions, and decoded area are supported.
  • Choose an output width that fits the terminal without wrapping.
  • Select the normal or reversed density ramp based on the tonal effect you want.
  • Regenerate the preview after changing the image, width, or ramp.
  • Display the copied text or downloaded TXT in a monospace font with tight line spacing.
  • Retain the original file when you need its color, transparency, animation, metadata, or full visual detail.