To convert typed text to numeric ASCII codes, map each standard ASCII character to its code; for example, the uppercase letter H has the decimal ASCII code 72. The linked image-art tool described below is a separate workflow and does not encode typed text as numbers.
That number-based output is useful when a downstream task needs a code list, such as checking character encoding in a development or data workflow. A page of numbers is not the same as ASCII art, which is a visual arrangement of characters. The Text to ASCII Art Generator supports the latter job: it accepts a local JPG, PNG, or WebP and returns copyable ASCII-art text. It does not turn typed words into decimal, hexadecimal, binary, or octal values, so it should not be used as a numeric encoder.

Choose how each character code is displayed
Text-to-code tools can present the same standard character code in different number bases. For H, these are alternate ways to write the same value, not different input characters:
| Representation | Code for H | Common use |
|---|---|---|
| Decimal | 72 | Readable numeric code lists |
| Hexadecimal | 48 | Technical formats that use base-16 notation |
| Binary | 01001000 | Inspecting a character’s bit pattern |
| Octal | 110 | Workflows that use base-8 notation |
For typed-text conversion, map each standard ASCII character to its numeric value in the required number base: decimal for readable code lists, hexadecimal for base-16 formats, binary for bit patterns, or octal for base-8 workflows. Preserve the one-to-one character-to-code order, including spaces and punctuation, and confirm the expected notation before using the output. If the requirement is instead a picture rendered with characters, the difference between ASCII codes and ASCII art explains why those two outputs should not be interchanged.
Related image-art workflow: create ASCII art with the local tool (not typed-text encoding)
- Open the tool and choose a JPG, PNG, or WebP file. Wait until the image dimensions appear so the browser has read the image before changing settings. Files larger than 15 MB and unsupported file types are rejected before decoding.
- Set the character width, which determines the number of character columns rather than the number of image pixels. Start near 80 columns for a first pass. A wider output can preserve more small detail but creates longer lines and more text; a narrower output is easier to place in a constrained layout.
- Choose the density set. Standard provides a balanced sequence, Detailed provides more tonal steps, and Simple uses fewer symbols for a bolder result. Enable Reverse when the destination uses a dark background and preserves spaces, because it swaps the light-dark direction.
- Generate the ASCII art and inspect it in the monospace preview. The row count follows the source aspect ratio and includes a height correction because monospace characters are usually taller than wide. If an unusually tall image would produce more than 800 rows or 100,000 characters, the tool asks for a smaller width or a cropped source instead of creating an impractical block.
- Copy the exact text to the clipboard or download it as a UTF-8 plain-text file named after the source image. The downloaded TXT contains only the generated character rows, so it can be opened in a text editor or passed to another local workflow.
Tune width and density for the result you need
These controls change how the image is interpreted, not the stored source file. The main choices are:
| Setting | Effect | Best fit |
|---|---|---|
| Standard density | Uses a balanced character sequence | A general first pass |
| Detailed density | Provides more tonal steps | A subject that lacks definition |
| Simple density | Uses fewer symbols for a bolder result | Output that appears too noisy |
| Larger width | Adds columns, longer lines, and more text | Small details that need more resolution |
| Narrower width | Produces shorter, more compact lines | Profiles, comments, or narrow layouts |
| Reverse | Swaps the light-dark direction | A dark destination that preserves spaces |
Each output cell comes from one sampled pixel. Transparent pixels are treated as if they appeared over a white background, preventing hidden color values in a transparent PNG from becoming unintended dark marks. The browser draws the source to a small sampling canvas and reads its pixels; MDN’s getImageData reference documents the canvas pixel-data interface behind that step. Each composited sRGB channel is then converted to a linear value, and relative luminance is calculated with the WCAG 2.2 coefficients. That luminance selects a character from the active density sequence: visually heavy symbols represent dark areas, while spaces or small punctuation represent bright areas. Reverse swaps those roles.
For a practical first pass, use 80 columns with the Standard set. Inspect important edges and recognizable features. Increase the width or choose Detailed when the subject lacks definition; choose Simple or a narrower width when the result is too noisy.
Account for file, memory, and text limits
The converter applies several limits, and each protects a different part of the process:
- File type and size: JPEG/JPG, PNG, and WebP are supported up to 15 MB. The browser checks the type and file size before decoding.
- Pixel dimensions: A separate 40-megapixel rule is checked after the browser has read the image dimensions. It limits subsequent canvas processing, but it cannot guarantee that decoding a highly compressed image will fit in every device’s memory. Close memory-heavy tabs or use a smaller source on a constrained device.
- Output dimensions: Character width controls the number of columns, while rows are derived from the source aspect ratio. Larger widths can therefore create substantially more text.
- Tall-image output: If the result would exceed 800 rows or 100,000 characters, the generator asks for a smaller width or cropped source rather than producing an impractical block.
Keep the source local and export plain text
The entire conversion runs in the current browser tab. The selected image is decoded locally, drawn to a small sampling canvas, and read as pixels without being uploaded to an image service. There is no account, remote queue, or server-side file copy involved. This makes the workflow suitable for ordinary private drafts while keeping the input and the generated text separate.
Copy places the exact generated rows on the clipboard. Download TXT creates a UTF-8 plain-text file containing only those rows, not the original picture. You can therefore reuse the result in a text editor, a source-code comment, a terminal-inspired design, or another local workflow without carrying the image into the destination.
Keep pasted ASCII art aligned
The generator’s monospace preview gives every character a predictable visual cell, but the destination may render that text differently. A proportional font can break alignment, some platforms collapse repeated spaces unless the content sits in a preformatted or code block, and different line heights can make the result appear stretched. Paste into a code block or another monospace, preformatted area when alignment matters.
Test the output at its final destination rather than judging it only in the preview. For platform-specific handling, see the guide to pasting generated ASCII art into Discord. Preview on a narrow screen as well, because the available width can change how the text looks.
Set realistic expectations for converted images
ASCII conversion is an interpretation, not a lossless image format. Fine texture, exact colors, readable small text, transparency effects, and photographic detail will not survive as they do in the source. The result works best when the subject remains recognizable through its main light and dark shapes rather than through subtle photographic detail.
Keep the original image, generate at several widths, and inspect the pasted result before relying on it. The output can be used for profile text, source-code comments, terminal-inspired design, or lightweight creative experiments, but it represents the image rather than reproducing it exactly.