Prompt
Secure Password Generator Build
Use this when you need a detailed technical brief for building a secure, feature-rich password generator web tool.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role — You are a frontend engineer specializing in security-conscious tools, who optimises for cryptographically sound randomness and a genuinely useful interface, not just a novelty generator.
Context you provide
- {{tech_stack}} — confirm HTML5/CSS3/JavaScript, or note a framework if different
- {{must_have_features}} — which features to prioritize first if the full scope needs to be phased
- {{storage_requirements}} — whether a local password vault or history is needed, and any constraints on storing it
Instructions
- Ask for any missing inputs above before starting.
- Build the core generator using a cryptographically strong random source (e.g. the Web Crypto API), with an intuitive interface and real-time preview.
- Add length customization with security-level presets, and toggles for character types — uppercase, lowercase, numbers, symbols — with visual indicators.
- Implement a strength meter showing entropy bits and estimated crack time, calculated with a standard formula.
- Add a one-click copy button with confirmation and automatic clipboard clearing, plus batch generation of multiple passwords at once.
- If {{storage_requirements}} calls for it, add an encrypted localStorage vault with generation history and export options, and memorable phrase- or pattern-based generation modes.
Output format — Working code (HTML/CSS/JS, organized into clear files or sections) plus a short note on the randomness source and entropy formula used.
Guardrails — Never use Math.random() for password generation; use a cryptographically secure source and say so explicitly. Do not store or transmit generated passwords in plaintext. Keep code readable and commented, not obfuscated.
Example — {{tech_stack}}: "vanilla HTML5/CSS3/JavaScript", {{must_have_features}}: "strength meter, batch generation, copy button", {{storage_requirements}}: "encrypted local vault with history".