Password Generator

Generate secure random passwords with custom length and options.

// about

About this Tool

Creates strong, hard-to-guess passwords to keep your online accounts safe from hackers. You can customize password length and choose whether to include numbers or special characters.

How to use it

  1. Select your desired password length (e.g., 12 to 32 characters).
  2. Check boxes for uppercase, lowercase, numbers, or symbols.
  3. Click 'Generate' and copy your new secure password.

Why people use this tool

  • Builds super secure passwords in less than a second.
  • Lets you pick exact password length and character combinations.
  • Guarantees no passwords are saved or sent over the internet.

Frequently Asked Questions

What makes a password strong?

A strong password has at least 12 characters and mixes letters, numbers, and symbols.

Are these generated passwords stored anywhere?

No! The password is generated entirely inside your browser and is never stored anywhere.

How often should I change my passwords?

It is good practice to update important passwords every few months and never reuse them.

Guides · Security · 7 min read

How to Create a Strong Password: Length, Entropy and Password Managers

Rules like 'include one special character' are familiar, but what really makes a password strong is randomness and length. Doing the maths shows clearly why some passwords are weak.

Attackers use three main methods: credential stuffing, which replays user names and passwords leaked from other sites; dictionary attacks, which try common passwords and words; and brute force, which tries every combination.

6 digits                      : 6 × log2(10)  ≈ 20 bits
16 random lowercase letters   : 16 × log2(26) ≈ 75 bits
12 random chars from 94       : 12 × log2(94) ≈ 79 bits
16 random letters and digits  : 16 × log2(62) ≈ 95 bits
How to calculate password entropy, why length beats complexity rules, which patterns to avoid and how to use a password manager.
Read guide →
Build it with AI

Build this tool yourself with AI

Want your own version of this tool? Copy the work-order prompt into an AI chat, or save the skill file for an AI coding agent. Both describe the features, edge cases and test cases we used when building it.

AI work-order prompt

Paste it as-is into an AI chat such as Claude, ChatGPT or Gemini.

You are an experienced full-stack web developer. Build a web tool called "Password Generator" that meets the requirements below.

## Goal

Build a random password generator that uses a cryptographically secure random source.

## Core features

- Length from 8 to 128
- Toggle upper case, lower case, digits and symbols
- Option to exclude look-alike characters (0/O, l/1)
- Generate several at once
- Show entropy in bits and a strength label

## Inputs

- Length, character sets, count, exclusions

## Outputs

- List of passwords
- Estimated entropy in bits

## Edge cases and handling rules

- Explain that at least one character set is required
- Guarantee at least one character from each selected set
- Use crypto.getRandomValues, never Math.random
- Avoid modulo bias when picking characters

## Implementation requirements

- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- Every result has 16 characters when length is 16
- Only digits appear when only digits are selected
- 12 characters from 94 shows about 79 bits

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

Skill (SKILL.md)

Save it as .claude/skills/build-password-generator/SKILL.md for AI coding agents such as Claude Code to reuse whenever you build or change this tool.

---
name: build-password-generator
description: Use when building or changing a Password Generator tool. Build a random password generator that uses a cryptographically secure random source.
---

# Build: Password Generator

## Goal

Build a random password generator that uses a cryptographically secure random source.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- Length from 8 to 128
- Toggle upper case, lower case, digits and symbols
- Option to exclude look-alike characters (0/O, l/1)
- Generate several at once
- Show entropy in bits and a strength label

## Inputs

- Length, character sets, count, exclusions

## Outputs

- List of passwords
- Estimated entropy in bits

## Rules

- Explain that at least one character set is required
- Guarantee at least one character from each selected set
- Use crypto.getRandomValues, never Math.random
- Avoid modulo bias when picking characters
- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.

## Verification

- [ ] Every result has 16 characters when length is 16
- [ ] Only digits appear when only digits are selected
- [ ] 12 characters from 94 shows about 79 bits

Tips for working with AI

  • Tell the AI your stack (for example React, Vue or plain HTML) on the first line so the code matches your project.
  • Ask it to run the listed test cases and show the results before you accept the code.
  • Never paste real secrets, customer data or API keys into the prompt; use sample values instead.