Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Generate ASCII Art with Figlet

Figlet is a quick and easy tool for converting text to ASCII art.

Install

sudo apt update && \
  sudo apt install figlet -y

Run

echo "derp" | figlet

...or:

figlet "derp"

Which would generate:

     _                 
  __| | ___ _ __ _ __  
 / _` |/ _ \ '__| '_ \ 
| (_| |  __/ |  | |_) |
 \__,_|\___|_|  | .__/ 
                |_|    

Different Fonts

Figlet can generate the text in different styles by using the -f perameter to specify the font style to use.

E.g.

figlet -f block "Hello World"
_|    _|            _|  _|            
_|    _|    _|_|    _|  _|    _|_|    
_|_|_|_|  _|_|_|_|  _|  _|  _|    _|  
_|    _|  _|        _|  _|  _|    _|  
_|    _|    _|_|_|  _|  _|    _|_|    



_|          _|                      _|        _|  
_|          _|    _|_|    _|  _|_|  _|    _|_|_|  
_|    _|    _|  _|    _|  _|_|      _|  _|    _|  
  _|  _|  _|    _|    _|  _|        _|  _|    _|  
    _|  _|        _|_|    _|        _|    _|_|_|  

Listing Fonts

To list the fonts that figlet can use, run the following command:

figlist
banner
big
block
bubble
digital
ivrit
lean
mini
mnemonic
script
shadow
slant
small
smscript
smshadow
smslant
standard
term

Here is the example output for each style:

style: banner

#####  ###### #####  #####  
#    # #      #    # #    # 
#    # #####  #    # #    # 
#    # #      #####  #####  
#    # #      #   #  #      
#####  ###### #    # #      

--------------------------
style: big
     _                 
    | |                
  __| | ___ _ __ _ __  
 / _` |/ _ \ '__| '_ \ 
| (_| |  __/ |  | |_) |
 \__,_|\___|_|  | .__/ 
                | |    
                |_|    
--------------------------
style: block

      _|                                
  _|_|_|    _|_|    _|  _|_|  _|_|_|    
_|    _|  _|_|_|_|  _|_|      _|    _|  
_|    _|  _|        _|        _|    _|  
  _|_|_|    _|_|_|  _|        _|_|_|    
                              _|        
                              _|        
--------------------------
style: bubble
  _   _   _   _  
 / \ / \ / \ / \ 
( d | e | r | p )
 \_/ \_/ \_/ \_/ 
--------------------------
style: digital
+-+-+-+-+
|d|e|r|p|
+-+-+-+-+
--------------------------
style: ivrit
                                                                             _ 
                                                          _ __  _ __ ___  __| |
                                                         | '_ \| '__/ _ \/ _` |
                                                         | |_) | | |  __/ (_| |
                                                         | .__/|_|  \___|\__,_|
                                                         |_|                   
--------------------------
style: lean

         _/                               
    _/_/_/    _/_/    _/  _/_/  _/_/_/    
 _/    _/  _/_/_/_/  _/_/      _/    _/   
_/    _/  _/        _/        _/    _/    
 _/_/_/    _/_/_/  _/        _/_/_/       
                            _/            
                           _/             
--------------------------
style: mini

 _| _ ._._  
(_|(/_| |_) 
        |   
--------------------------
style: mnemonic
derp
--------------------------
style: script

   |                 
 __|   _   ,_     _  
/  |  |/  /  |  |/ \_
\_/|_/|__/   |_/|__/ 
               /|    
               \|    
--------------------------
style: shadow
     |                 
  _` |  _ \  __| __ \  
 (   |  __/ |    |   | 
\__,_|\___|_|    .__/  
                _|     
--------------------------
style: slant
       __              
  ____/ /__  _________ 
 / __  / _ \/ ___/ __ \
/ /_/ /  __/ /  / /_/ /
\__,_/\___/_/  / .___/ 
              /_/      
--------------------------
style: small
    _              
 __| |___ _ _ _ __ 
/ _` / -_) '_| '_ \
\__,_\___|_| | .__/
             |_|   
--------------------------
style: smscript

 _|   _  ,_      
/ |  |/ /  | |/\_
\/|_/|_/   |/|_/ 
            (|   
--------------------------
style: smshadow
     |             
  _` |  -_)  _|_ \ 
\__,_|\___|_| .__/ 
             _|    
--------------------------
style: smslant
     __           
 ___/ /__ _______ 
/ _  / -_) __/ _ \
\_,_/\__/_/ / .__/
           /_/    
--------------------------
style: standard
     _                 
  __| | ___ _ __ _ __  
 / _` |/ _ \ '__| '_ \ 
| (_| |  __/ |  | |_) |
 \__,_|\___|_|  | .__/ 
                |_|    
--------------------------
style: term
derp
Last updated: 7th September 2022
First published: 1st February 2021

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch