Image to ASCII Art
Convert an image into copyable text-based ASCII artwork
Image to ASCII Art — what it does
Convert an image into text art by sampling its brightness and mapping each region to a character from a density ramp you choose. Set the character width, pick a character set, optionally invert brightness for dark backgrounds, and copy the result as plain text that renders anywhere a monospace font does.
Worked example
A 1600 × 1200 test image that fades from dark navy at the top left to light yellow at the bottom right, converted at a character width of 40 with the default character set. The status line reported 40 × 14 and the download was ascii-art.txt.
Input — file and settings
team-photo.jpg — 1600 × 1200 gradient test image (dark navy top left, light yellow bottom right) Character width: 40 ASCII character set: @%#*+=-:. (default) Invert brightness: off
Output — ascii-art.txt (40 × 14 characters)
@@@@@@@@%%%%%%%%%%%%%%%%%%%############# %%%%%%%%%%%%%%%%%###################**** %%%%%%%%##################************** #################*******************++++ #######*******************++++++++++++++ ****************+++++++++++++++++++===== *******+++++++++++++++++++============== ++++++++++++++++===================----- ++++++===================--------------- ===============-------------------:::::: ======-------------------::::::::::::::: ---------------:::::::::::::::::::...... ------::::::::::::::::::................ ::::::::::::::...................
Height is image ratio × width × 0.48, so 1200/1600 × 40 × 0.48 = 14.4 rounds to 14 lines. The first character of the set (@) is used for the darkest samples and the last (a space) for the lightest, which is why the final line ends in blanks.
When this tool helps
- Making a text banner or logo for a terminal, README or command-line tool.
- Producing an image-free representation for a plain-text email or a bulletin board post.
- Creating retro-styled artwork for a personal site or code comment.
How to use it
- Choose an image with clear contrast.
- Set the character width in columns.
- Pick a character set and invert brightness if needed.
- Process, then copy or download the ASCII art.
Accuracy, limits, and good practice
- High-contrast images with a clear silhouette convert far better than busy photographs — detail turns to noise at character resolution.
- Invert brightness when the art will sit on a dark terminal; the mapping that reads correctly on white reads inside-out on black.
- Characters are taller than they are wide, so the output looks vertically stretched unless the renderer's line height is tightened.
Frequently asked questions
What width should I use?
80 columns suits terminals and email, 100 to 150 gives more detail on a webpage. Wider output needs horizontal scrolling.
Does the character set matter?
A lot. A longer ramp gives more tonal steps and smoother gradients; a short set produces a starker, more graphic look.
Can I convert it back to an image?
Not from the text. Screenshot the rendered art if you need it as a picture.
What are the limits on character width?
Width is clamped to 10–240 whatever you type: on the same image 500 produced 240 × 86 and 3 produced 10 × 4. Height is always computed from the image proportions and cannot be entered.
What does Invert brightness change?
It maps dark samples to the last character of the set and light samples to the first, so the same example starts with spaces at the top left and ends with @ at the bottom right. Use it when the art will be shown as light text on a dark background.
Related tools on this site
- RGB Channel Splitter — Separate an image into red, green, and blue channel images
- Batch Image Compressor — Compress multiple images and download them as a ZIP
- Image Collage Maker — Arrange multiple images into a downloadable grid
Further reading: Getting images ready for the web, email and social media
Everything above runs inside this page. Image to ASCII Art needs no account, no upload, and no server round trip — close the tab and nothing is left behind.
圖片轉 ASCII 字元畫能做什麼
把圖片取樣亮度,再把每個區塊對應到你選定的字元密度階,藉此轉成文字畫。設定字元寬度、挑選字元集,必要時反轉亮度以配合深色背景,結果是純文字,任何支援等寬字型的地方都能顯示。
實際範例
一張 1600 × 1200 的測試圖,從左上的深藍漸層到右下的淺黃,以字元寬度 40 和預設字元集轉換。狀態列顯示 40 × 14,下載檔名為 ascii-art.txt。
輸入:檔案與設定
team-photo.jpg — 1600 × 1200 gradient test image (dark navy top left, light yellow bottom right) Character width: 40 ASCII character set: @%#*+=-:. (default) Invert brightness: off
輸出:ascii-art.txt(40 × 14 個字元)
@@@@@@@@%%%%%%%%%%%%%%%%%%%############# %%%%%%%%%%%%%%%%%###################**** %%%%%%%%##################************** #################*******************++++ #######*******************++++++++++++++ ****************+++++++++++++++++++===== *******+++++++++++++++++++============== ++++++++++++++++===================----- ++++++===================--------------- ===============-------------------:::::: ======-------------------::::::::::::::: ---------------:::::::::::::::::::...... ------::::::::::::::::::................ ::::::::::::::...................
高度是圖片長寬比 × 寬度 × 0.48,所以 1200/1600 × 40 × 0.48 = 14.4,四捨五入為 14 行。字元集的第一個字元(@)代表最暗的取樣,最後一個(空格)代表最亮,因此最後一行以空白結尾。
什麼時候用得上
- 為終端機、README 或命令列工具做文字橫幅或標誌。
- 為純文字郵件或論壇貼文,做出不需圖片的視覺呈現。
- 為個人網站或程式註解製作復古風格的圖案。
使用步驟
- 選擇對比清楚的圖片。
- 設定字元寬度(欄數)。
- 挑選字元集,必要時反轉亮度。
- 執行轉換,再複製或下載字元畫。
精確度、限制與實務建議
- 輪廓清楚、對比高的圖遠比細節繁雜的照片好轉——在字元解析度下,細節只會變成雜訊。
- 作品要放在深色終端機時請反轉亮度;在白底看起來正確的對應,在黑底會整個反過來。
- 字元高比寬大,除非把行高收緊,輸出看起來會被縱向拉長。
常見問題
寬度該設多少?
終端機與郵件用 80 欄,網頁上 100 到 150 欄細節更多。再寬就需要水平捲動。
字元集有差嗎?
差很多。階數多的字元集色調層次細、漸層平順;字元少則呈現更強烈的圖像感。
可以轉回圖片嗎?
文字本身無法還原。需要圖片時,請對渲染後的成果截圖。
字元寬度有什麼限制?
不論輸入多少,寬度都會被限制在 10 到 240 之間:同一張圖填 500 得到 240 × 86,填 3 得到 10 × 4。高度一律由圖片比例算出,不能自行輸入。
「反轉亮度」會改變什麼?
它把暗的取樣對應到字元集的最後一個字元、亮的對應到第一個,所以同一個範例會從左上的空白開始、以右下的 @ 結束。字元畫要以淺色文字放在深色背景上時請勾選。
本站相關工具
- RGB 色彩通道分離 — 將圖片分離成紅、綠、藍三個通道圖片
- 批量圖片壓縮 — 壓縮多張圖片並以 ZIP 下載
- 圖片拼貼產生器 — 將多張圖片排列成可下載的網格拼圖
延伸閱讀: 為網頁、電子郵件與社群媒體準備圖片
以上步驟全部在這個頁面內完成,圖片轉 ASCII 字元畫 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。