To convert an image to ASCII on Linux for terminal display, use Image To Ascii in your browser: it accepts PNG, JPEG, GIF, or WebP, uses a 10–200 character output width, and produces copyable text or a local TXT file.

This is a browser-to-terminal workflow rather than a native terminal-only conversion. The page converts the image in the current browser tab, and you can then display the generated characters in a Linux terminal.

Decoding, resizing, luminance calculation, copying, and TXT creation all happen locally. The original image and its decoded pixels are not sent to a remote conversion service.

convert image to ascii linux
Convert Image to ASCII on Linux for Terminal Display

What the browser converter produces

Image To Ascii converts one decoded bitmap into a grid of ordinary text characters. An animated GIF is represented by one still frame rather than an animation, and the result reflects visible tone rather than the original colors.

The page first resizes the source frame to the planned number of columns and rows. It then reads one RGBA sample for every output character. MDN’s references for Canvas drawImage and getImageData explain the browser APIs used during that resize-and-sample stage.

Transparent pixels are first composited over white. The converter then linearizes each sRGB channel, calculates relative luminance, and maps that value to one of ten fixed density symbols. Reverse mode flips the same ramp. This is visual ASCII art, not optical character recognition: the tool does not recognize or transcribe words, objects, or meaning already present in the image.

Convert an image to ASCII on Linux

  1. Open the browser converter. Load the Image To Ascii tool in a browser running on Linux. No terminal command or separate image-processing package is required for this workflow.
  2. Choose one source image. Select a PNG, JPEG, GIF, or WebP file. The encoded file can be at most 15 MiB, each decoded side can be at most 8,192 pixels, and the decoded area can be at most 24 million pixels.
  3. Enter the output width. Use a plain base-10 whole number from 10 through 200. Do not add a sign, unit, whitespace, decimal point, leading zero form, or scientific notation. Values outside the range fail instead of being adjusted automatically.
  4. Choose the density direction. Leave the ramp in its normal position so dark regions receive denser characters, or enable reverse mode so light regions receive dense characters and dark regions receive sparse ones.
  5. Generate the complete result. Wait for the local preview to appear. An unsupported or over-limit image produces no partial ASCII result. Changing the source, width, or ramp direction clears the previous result, so generate it again after making a change.
  6. Copy or download the text. Copy the visible characters directly, or download the generated plain-text file with a TXT extension for use in an editor or terminal.

The downloaded file is created from the complete serialized output. It is not a screenshot of the preview, so it contains characters and newline separators rather than browser formatting.

Limits that determine whether conversion completes

CheckAccepted valueWhen the limit is exceeded
Input formatPNG, JPEG, GIF, or WebPThe file is rejected if the browser cannot decode it.
Encoded file sizeAt most 15 MiBNo ASCII result is created.
Decoded side lengthAt most 8,192 pixels per sideNo preview or download is produced.
Decoded image areaAt most 24 million pixelsNo preview or download is produced.
Output widthPlain whole number from 10 through 200Invalid or out-of-range widths are rejected.
Serialized text lengthAt most 50,000 characters, including newlinesThe tool reports the limit without truncating the art.

A matching file extension or MIME type only passes the initial format screen. The browser must actually decode the content, so a malformed file or an unsupported codec profile can still fail. The encoded and decoded limits are separate because a compressed file may expand into a much larger bitmap in browser memory.

For a valid but unusually tall image, the character budget may become the deciding limit even when the chosen width is within the accepted range. The converter refuses to shorten the output silently because doing so would remove part of the requested picture.

Pick a width that fits the terminal

The output height is calculated with an explicit character-cell correction:

rows = round(source pixel height ÷ source pixel width × chosen output width × 0.5), with at least one row.

The 0.5 factor approximates the proportions of an ordinary monospace character cell, which is often about twice as tall as it is wide. It is a practical preview estimate rather than a measurement of the font in your terminal. A wider setting produces more columns and usually more rows, so a tall source image can reach the 50,000-character limit faster.

Ramp settingDark visible areasLight visible areas
NormalDense symbols near the @ end of the rampSparse symbols toward the space end
ReversedSparse symbolsDense symbols near the @ end

Reverse mode changes the character mapping, not the image order or dimensions. Because the converter works from luminance, it cannot reproduce individual source colors even though different brightness levels are represented by different symbol densities.

Read the result in a Linux terminal

  1. Download the TXT file. Use the converter’s download action and note the filename assigned by your browser.
  2. Open a terminal in the download folder. If the file is in the standard Downloads directory, run cd ~/Downloads. Otherwise, enter the folder that actually contains the download.
  3. Confirm the filename. Run ls to list the directory contents.
  4. Display the art. Run cat filename.txt, replacing filename.txt with the exact name shown by ls.
  5. Check the terminal width. Keep the terminal’s monospace font and use a tight line height. If the generated width exceeds the visible number of columns, reduce the width in the converter and regenerate before displaying it again.

Copying the visible output and pasting it into the terminal is another option, although the downloaded TXT file is easier to reopen or pipe into another program. Terminal display does not restore color, transparency, or any metadata that was absent from the ASCII output.

If your requirement is a script-driven terminal pipeline rather than a browser-generated file, the Convert Image to ASCII Art in Python full-script guide covers that separate approach.

Why the shape can change between apps

The character grid is calculated in advance, but the displayed proportions depend on the viewer. A different font, line height, terminal, editor, zoom level, or letter-spacing setting can make the art appear taller, shorter, wider, or narrower. The 0.5 row correction is therefore a practical approximation for common monospace displays, not a guarantee of identical sizing everywhere.

Browser-implemented image smoothing also affects the resized pixels used for character mapping. Fine patterns and aggressive reductions can produce small differences between browser engines. The fixed luminance and character-mapping rules remain consistent, but the sampled pixel values may differ slightly. If exact visual fidelity matters, retain the original image alongside the ASCII version.

What the TXT file leaves out

The downloaded text is intentionally minimal. It contains only ASCII characters and the newline separators between rows. It does not retain:

  • Source colors or transparency
  • Animation or individual GIF frames
  • Metadata and camera information
  • Layers, embedded profiles, or the original compressed image

It is also not a transcription of the picture. If the source contains a sign, document, or terminal command, the result represents that image visually with characters rather than extracting the readable content.

Keep the original file when you need archival data, color accuracy, animation, transparency, or a pixel-faithful copy. The TXT download is best suited to sharing, embedding, or displaying a text-based interpretation of one still image.