Hey, internet programmers today we write a python program that generates text to ASCII art. Let’s code Text to ASCII art using python.
We use pyfiglet python module to generate Text to ASCII text art in python. pyfiglet takes ASCII text and renders it in ASCII art fonts. figlet_format
method converts ASCII text into ASCII art fonts.
PNY 128GB Turbo Attaché 3 USB 3.0 Flash Drive 5-Pack – Grey, P-FD128X5TBOP-MP, 100MB/s, Light-Weight Durable - Data Storage and Transfer
$29.99 (as of August 18, 2025 15:17 GMT +03:00 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Installation
pip install pyfiglet
Code
Example 1: default font
# import pyfiglet module import pyfiglet result = pyfiglet.figlet_format("CodeSnail") print(result)
Output

Example 2: speed font
–>
# import pyfiglet module import pyfiglet result = pyfiglet.figlet_format("CodeSnail", font="speed") print(result)
Output

Example 3: 3-d font
# import pyfiglet module import pyfiglet result = pyfiglet.figlet_format("CodeSnail", font="3-d") print(result)
Output

Example 4: pyramid font
# import pyfiglet module import pyfiglet result = pyfiglet.figlet_format("CodeSnail", font="pyramid") print(result)
Output

Example 5: weird font
# import pyfiglet module import pyfiglet result = pyfiglet.figlet_format("CodeSnail", font="weird") print(result)
Output

Example 5: alligator font
# import pyfiglet module import pyfiglet result = pyfiglet.figlet_format("WOW", font="alligator") print(result)
Output

lots of fonts right. There are others too.
How to get all list of fonts in pyfiglet?
Type this in a terminal, it will show all the fonts you can use.
pyfiglet -l
or
pyfiglet --list_fonts
In a python file, you can get a fonts list
# import pyfiglet module import pyfiglet print(pyfiglet.FigletFont.getFonts())
And you get all list of fonts.
Must try this module to generate text to ASCII art. Follow me on Instagram @code_snail
You may also like,
Source: https://www.codesnail.com/text-to-ascii-art-using-python/