VOOZH about

URL: https://www.geeksforgeeks.org/python/create-certificates-using-python-pil/

⇱ Create Certificates using Python-PIL - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Create Certificates using Python-PIL

Last Updated : 15 Jul, 2025
Prerequisites: Python: Pillow (a fork of PIL) Well if you have ever done something like creating certificates for participants of any event, then you know how tedious process it is. Let's automate that using Python. We will be using the Pillow module of Python. To install that simply type the following in your terminal
pip install Pillow
You also need the design of the certificate as an image format (preferably png). You can use something like Microsoft Office Publisher to create the certificates and export them as png. Keep some extra space for entering the name. Below is the template certificate we will be using. Template Certificate: 👁 Sample Certificate
So, our certificate template is ready. Now, we need to find a suitable font for writing the name on it. You need the path to the font file (TTF file). If you are using Windows 10, then simply search for Fonts in windows search, it will show you results of Fonts settings. Head over there and you should see something similar to the following screen. 👁 Fonts settings
Now, choose the font you like from here and click on it. You will see a path to that font. Note down the path somewhere. You will need it in your code. Below is the implementation. Output: 👁 Final Certificate result
Add the names to the NAMES list. Then change the font path and path to the certificate template according to your system. Then run the above code and all your certificates should be ready. This is a pretty effective solution for automating the process of creating certificates for a large number of participants. This can be very effective for event organizers.
Comment
Article Tags:
Article Tags: