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.
SSK 1TB USB Drive,External SSD Fast 550MB/s 2-in-1 Dual-Drive Type C+ A USB3.2 Gen2 Solid State ThumbDrive SSD-Stick for iPhone 15/16/PS4/Android Phone/Tablet/Windows/Mac
$69.99 (as of September 11, 2025 18:14 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/