Coders Packet

Password generator using Python and Tkinter

By Archisman Bhattacharya

This is a code for a password generator using python based on the user's choice of character sets. It also contains a GUI designed using the Tkinter module of python.

Version and Module Used:

Python 3



Passwords are used to protect our data and keep them secure. A small breach can cost us our privacy. Thus it is always suggested to use strong passwords. A strong password should be made up of alphabets, numbers, and special characters. 

This code asks the user to select the character sets they want to use in the password. Then it asks the user to set the length of the password. 

The code then generates a strong password for them. 

This is done by selecting a random character from the character sets selected by the user. This selection is done for every single position until the entire password is generated. The generated password is then displayed to the user. 

The user can choose to use the password or generate a new one. In case if the user chooses to generate a new one, the entire process is repeated.

Password Generator GUI

This code uses Tkinter to create a GUI for the user to interact with.

It contains 4 checkboxes for the user to select the different character sets(Capital Letters, Small Letters, Numbers, Special Characters).

It also has a slider that lets the user decide the length of the password(8-30 characters long).

When the user clicks on the Generate Password button, a new password is generated.

Download Complete Code


No comments yet