PassGen is a simple, secure, and customizable password generator built with HTML, CSS, and JavaScript. It allows users to generate strong passwords with options to include uppercase, lowercase, numbers, symbols, and set the desired length. It also includes a copy-to-clipboard button for easy use.
- π’ Set password length
- π Include/exclude uppercase letters
- π‘ Include/exclude lowercase letters
- π’ Include/exclude numbers
- π£ Include/exclude symbols
- π Copy password to clipboard with one click
- β‘ Instantly generates password on demand
- π¨ Clean, responsive, and accessible UI
π Try it Live
- HTML5 β Structure and UI elements
- CSS3 β Styling and responsive layout
- JavaScript (ES6) β Logic and functionality
pass-gen/
βββ index.html # Main HTML file
βββ style.css # CSS styles
βββ script.js # Password generation logic
βββ README.md # Project documentation
Users can customize:
- Password length (e.g. 8β20 characters)
- Whether to include:
- Uppercase letters
- Lowercase letters
- Numbers
- Symbols
Click the "Generate Password" button to create a new random password based on the selected criteria.
Click the "Copy" button to copy the generated password to your clipboard. A small notification (optional) confirms the action.
- Character pools are defined for each type: uppercase, lowercase, numbers, symbols.
- Based on user selections, a character set is assembled.
- A loop runs
lengthtimes, selecting random characters from the pool. - Clipboard API (
navigator.clipboard.writeText) is used to copy the password.
To run this project locally:
# Clone the repository
git clone https://github.com/nirdhum/pass-gen.git
# Navigate into the directory
cd pass-gen
# Open index.html in your browserOr simply open index.html in any modern browser.
- Contributions are welcome!
- Fork the repo
- Create a new branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License.
Nirdhum
If you find this project helpful, please give it a βοΈ on GitHub and share it with others!