A lightweight, secure browser-based password generator that creates strong random passwords with customizable character sets. Built with vanilla JavaScript, HTML, and CSS - no dependencies required.
- Features
- Demo
- Screenshots
- Technologies Used
- Installation
- Usage
- Project Structure
- How It Works
- Future Enhancements
- Contributing
- License
- Author
- Random password generation with 12 characters
- Includes uppercase letters, lowercase letters, numbers, and special symbols
- One-click copy to clipboard functionality
- Clean and responsive user interface
- No external dependencies
- Client-side generation for maximum security
- HTML5
- CSS3
- JavaScript (Vanilla)
- Google Fonts (Poppins)
Clone the repository:
git clone https://github.com/yourusername/random-password-generator.gitNavigate to the project directory:
cd random-password-generatorOpen the index.html file in your browser:
# On macOS
open index.html
# On Linux
xdg-open index.html
# On Windows
start index.htmlOr simply double-click the index.html file.
- Open the application in your web browser
- Click the "Generate Password" button to create a random password
- The password will appear in the input field
- Click the copy icon to copy the password to your clipboard
- Paste and use your secure password wherever needed
random-password-generator/
│
├── index.html # Main HTML file
├── style.css # CSS stylesheet
├── images/ # Directory for images
│ ├── copy.png # Copy icon
│ └── generate.png # Generate button icon
└── README.md # Project documentation
The password generator ensures security by:
-
Character Set Definition: Uses four character sets:
- Uppercase:
ABCDEFGHIJKLMNOPQRSTUVWXYZ - Lowercase:
abcdefghijklmnopqrstuvwxyz - Numbers:
123456789 - Symbols:
@#$%^&*()_+~|}{[]></-=
- Uppercase:
-
Guaranteed Diversity: The algorithm ensures at least one character from each set:
password += upperCase[Math.floor(Math.random() * upperCase.length)]; password += lowerCase[Math.floor(Math.random() * lowerCase.length)]; password += number[Math.floor(Math.random() * number.length)]; password += symbol[Math.floor(Math.random() * symbol.length)];
-
Random Fill: Remaining characters are randomly selected from all character sets
-
Output: Generates a 12-character password with mixed character types
Uses the document.execCommand("copy") method to copy the generated password to the clipboard.
- Add password length customization slider
- Add character type toggle options (enable/disable uppercase, lowercase, numbers, symbols)
- Implement password strength indicator
- Add password history with local storage
- Create dark/light theme toggle
- Add multiple password generation
- Include password entropy calculator
- Add export functionality (download passwords as text file)
Contributions are welcome! Please follow these steps:
- Fork the repository
git fork https://github.com/yourusername/random-password-generator.git- Create a new branch
git checkout -b feature/your-feature-name- Make your changes and commit
git add .
git commit -m "Add: your feature description"- Push to your branch
git push origin feature/your-feature-name- Open a Pull Request
This project is open source and available under the MIT License.
Your Name
- GitHub: @najamulhuda
- Email: najamulhuda791@gmail.com
Give a ⭐️ if you like this project!
Made with ❤️ and JavaScript