A simple and responsive Password Generator web application built with React and Vite. It lets you generate secure random passwords with customizable options and copy them to your clipboard with a single click.
- Configurable length – Slide the range input to choose a password length between 9 and 40 characters.
- Include numbers – Toggle to add digits (0–9) to the character pool.
- Include special characters – Toggle to add special characters (
!@#$%^&*()_+) to the character pool. - Auto-regenerate – A new password is generated automatically whenever any option changes.
- Copy to clipboard – Click the Copy button to copy the current password to your clipboard instantly.
| Tool | Purpose |
|---|---|
| React 18 | UI library |
| Vite 5 | Build tool & dev server |
| ESLint | Code linting and lint code |
- Node.js v18 or later
- npm (comes with Node.js)
# Clone the repository
git clone https://github.com/chakrateja70/password-generator.git
cd password-generator
# Install dependencies
npm install# Start the development server
npm run devOpen http://localhost:5173 in your browser.
npm run buildThe production-ready files will be in the dist/ folder.
# Preview the production build locally
npm run previewnpm run lint- A base character set of uppercase and lowercase letters is always included.
- Enabling Numbers appends
0123456789to the character set. - Enabling Special Characters appends
!@#$%^&*to the character set. - A random password of the selected length is generated from the combined character set using
Math.random(). - The password field is read-only; use the Copy button to copy it to your clipboard.
password-generator/
├── public/ # Static assets
├── src/
│ ├── App.css # Component styles
│ ├── App.jsx # Main Password Generator component
│ └── main.jsx # React entry point
├── index.html # HTML template
├── package.json
└── vite.config.js