The Password Generator is a user-friendly web application designed to create strong, customizable passwords. It offers users flexibility in setting password length and character types, ensuring robust security.
Live Demo: Password Generator by Ivin Titus
- Customizable Password Length: Choose a length between 8 and 52 characters.
- Character Options:
- Uppercase letters
- Lowercase letters
- Numbers
- Symbols
- Password Copying: Easily copy generated passwords to your clipboard.
- Responsive Design: Optimized for mobile and desktop viewing.
- Elegant UI: Gradient backgrounds, smooth transitions, and visually appealing controls.
Here’s a preview of the Password Generator:
- A web browser (modern versions of Chrome, Firefox, Edge, etc.).
- Clone this repository:
git clone https://github.com/ivin-titus/password-generator.git
- Navigate to the project directory:
cd password-generator
- Open the
index.html
file in your browser.
- Set the Password Length: Use the slider to specify your desired length.
- Select Character Options: Check or uncheck the character type options.
- Generate Password: Click the Generate Password button.
- Copy Password: Click the Copy button to copy the generated password to your clipboard.
The function generatePassword()
dynamically builds a character set based on user input and generates a random password:
function generatePassword() {
var charset = "";
if (uppercase) charset += "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if (lowercase) charset += "abcdefghijklmnopqrstuvwxyz";
if (numbers) charset += "0123456789";
if (symbols) charset += "!@#$%^&*()_+~`|}{[]:;?><,./-=";
var password = "";
for (var i = 0; i < length; i++) {
password += charset.charAt(Math.floor(Math.random() * charset.length));
}
document.getElementById("password").value = password;
}
The password length is updated in real-time:
document.getElementById("length").addEventListener("input", function() {
document.getElementById("length-value").textContent = this.value;
});
- Icons: Boxicons
- Background Image: Custom design
If reusing the code, kindly provide proper credits:
Password Generator © 2024 Ivin Titus.
GitHub: https://github.com/ivin-titus
This project is © 2024 Ivin Titus. Unauthorized redistribution without credits is prohibited.
© 2024 Ivin Titus