Convert image to ASCII art on Linux by opening Image To Ascii in a Linux browser, choosing one PNG, JPEG, GIF, or WebP, setting a width from 10 to 200 characters, and generating a local TXT file.

This is a browser-based Linux workflow rather than a shell command. It decodes the image in the current tab and turns a still frame into ordinary text you can copy or download, allowing you to display the result in a terminal without installing a separate image-to-ASCII package.

convert image to ascii art linux
Convert Image to ASCII Art on Linux: Local Workflow

Convert Image to ASCII Art on Linux

  1. Open Image To Ascii in your Linux web browser and use its file picker to choose one local PNG, JPEG, GIF, or WebP image.
  2. Wait for the browser to decode the selected file. A matching extension or MIME type passes only the initial format check; the browser must successfully decode the actual image before conversion can begin.
  3. Enter the output width as a plain base-10 whole number from 10 through 200. Do not include a sign, unit, whitespace, decimal point, leading-zero form, or scientific notation.
  4. Choose the normal density ramp for dark marks on a light background, or reverse the ramp when you want dense characters in lighter image areas and sparse characters in darker areas.
  5. Generate the ASCII result and inspect the preview. Editing the image, width, or ramp direction clears the previous result and requires a new generation.
  6. Copy the visible text or download the plain-text file. The download contains only ASCII characters and newline separators.
  7. To view the downloaded art in a Linux terminal, open the download folder and run cat ascii-art.txt, replacing ascii-art.txt with the actual downloaded filename.

If conversion reports a decoding, dimension, width, or output-size problem, it does not create partial ASCII art. Correct the reported condition and generate the file again.

What Stays on Your Linux Machine

Decoding, canvas resizing, luminance calculation, copying, and TXT creation all happen locally in the current browser tab. The image, processed pixels, generated text, and filename are not uploaded to Lizely. Once the browser creates the download, the resulting file is stored on your system just like any other browser download.

The TXT is intentionally limited to characters and line breaks. It does not retain color, transparency, animation, metadata, camera information, layers, embedded profiles, or the original compressed image. Keep the source file when those properties matter.

Limits That Determine Whether Conversion Completes

Every source and output limit must pass before Image To Ascii can produce a preview or download.

Item Accepted value Result when the limit fails
Source format One PNG, JPEG, GIF, or WebP file The file must pass the initial format screen and be decoded successfully.
Encoded file size At most 15 MiB An oversized file is rejected without a partial result.
Decoded side length At most 8,192 pixels per side Each decoded side is checked independently.
Decoded area At most 24 million pixels An image that decodes into too much pixel data is rejected.
Output width A strict whole number from 10 through 200 Invalid syntax and out-of-range values are rejected rather than clamped.
Serialized output At most 50,000 characters, including every newline separator The tool reports the limit and produces no preview or download.

Malformed content and unsupported codec profiles can still fail during decoding even when the filename looks correct. Source dimensions are validated separately from the output controls, so changing the width while a file is decoding cannot let an older width decide whether the image is accepted.

A very tall image can exceed the 50,000-character limit at an otherwise valid width. Reducing the width can reduce the row count and serialized size, but the original aspect ratio remains a factor. The tool never silently removes rows to force an oversized result into the limit.

How the Image Becomes Text

The decoded frame is drawn into a small canvas whose dimensions exactly match the planned ASCII columns and rows. The canvas is filled white first, giving transparent pixels a defined background. Browser-managed, high-quality smoothing performs the resize through the Canvas drawImage method, after which Canvas getImageData retrieves one RGBA sample for each output character.

Alpha is composited over white, each sRGB channel is linearized with the W3C relative-luminance transfer function, and luminance is calculated as 0.2126 red plus 0.7152 green plus 0.0722 blue. The resulting value is multiplied by nine and rounded to select one of ten entries in the fixed density ramp.

The normal ramp begins with @, continues through progressively lighter symbols, and ends with a space. Reverse mode flips that same mapping, assigning dense characters to light regions and sparse characters to dark regions. This is visual tone mapping, not OCR: the converter does not recognize letters, words, objects, or meaning. Browser-managed resampling can also vary slightly between engines, particularly for detailed patterns or aggressive reductions.

Set Output Height for a Terminal-Friendly Result

Rows are calculated as round(source height ÷ source width × output width × 0.5), with a minimum of one row. The 0.5 factor corrects for the common shape of monospace character cells, which are often about twice as tall as they are wide.

For a 1,600 × 900 pixel source at output width 100: rows = round(900 ÷ 1,600 × 100 × 0.5) = round(28.125) = 28. The serialized text is 100 × 28 + 27 = 2,827 characters, including 27 newline separators.

This is a practical preview approximation rather than a measurement of your terminal. Font choice, line height, editor, zoom, terminal, and letter spacing can make the downloaded art appear taller or shorter. Use a monospace font with a tight line height for the closest match to the generated proportions.

Choose Width and Density for the Intended Display

The width controls the number of character columns, not the number of source pixels. A wider result retains more horizontal detail but creates a larger file; a narrower result is more compact but can lose small features. Comparing two widths in the preview is the most reliable way to choose for a particular image and terminal.

Use the normal ramp when the source is mainly dark content on a light background. Reverse the ramp for light-on-dark terminal presentation, where dense characters in light source regions and sparse characters in dark regions create the desired contrast.

For very tall images, watch the serialized-output limit because every extra row adds both character cells and a newline separator. Lowering the width is the direct way to reduce output size without changing the source file.

Know What the Text File Cannot Replace

ASCII output is a visual approximation of visible tones, not a lossless version of the source. An animated GIF produces one still frame, transparent areas are represented against white, and the TXT contains no color or animation. A reverse ramp changes character placement but does not restore lost visual information.

Use the TXT when you need portable, text-based artwork for a terminal, editor, message, or text file. Keep the original image when visual fidelity, archival details, transparency, metadata, or animation matters.

If you're weighing options, Pixel Art From Image: A Practical Browser Workflow covers this in detail.

If you're weighing options, WebP Converter Alternative for Private, Local Batch Work covers this in detail.