# Password & Passphrase Generator > Strong random passwords and passphrases, made in your browser, with exact entropy. Generates random passwords (length, character sets, no look-alike characters, at least one of each class) or passphrases from a 2048-word list with separators and capitalisation. Shows the exact entropy in bits and how long guessing would take. With JavaScript on, everything is generated locally in your browser. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://passwordgenerator.usefulweb.site/ (interactive tool at https://passwordgenerator.usefulweb.site/tool) - JSON API: POST https://passwordgenerator.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://passwordgenerator.usefulweb.site/api/v1/tool) - OpenAPI: https://passwordgenerator.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://passwordgenerator.usefulweb.site/mcp - tool `password_generator` ## Inputs - mode (select): Type - length (integer): Password length - Random password only. 16+ characters are recommended; 20+ for important accounts. - charsets (multiselect): Character sets - excludeAmbiguous (boolean): Avoid look-alike characters (I l 1 O 0 o | ` ' ") - requireEach (boolean): Include at least one character from each selected set - words (integer): Number of words - Passphrase only. Each word adds 11 bits of entropy. - separator (select): Word separator - capitalization (select): Capitalisation - includeNumber (boolean): Append a random digit to one random word - count (integer): How many - seed (text): Demo seed (optional, makes output reproducible — never for real passwords) - Leave empty for real use. With a seed, anyone who knows it can regenerate the same passwords. ## Method - Random password: every character is drawn uniformly from the selected sets with an unbiased random integer (rejection sampling, no modulo bias). "At least one of each set" regenerates the whole password until the rule holds, which keeps all valid passwords equally likely. - Entropy is exact: log2 of the number of possible passwords. With "at least one of each set" the count is computed by inclusion–exclusion, so it is slightly lower than length × log2(pool size). - Passphrase: words are drawn uniformly from a bundled list of 2048 common English words (4–8 letters), so each word adds exactly 11 bits. Random capitalisation adds 1 bit per word; an appended digit adds log2(10 × words) bits. - Guessing times assume the attacker knows exactly how the password was generated (the worst case) and finds it on average after trying half of all possibilities. - In the browser, passwords are generated locally with crypto.getRandomValues and never sent anywhere. Without JavaScript (and via the API/MCP), the server generates them with Node.js crypto.randomInt and sends them back over HTTPS without storing them. ## Limits - Use a password manager and a different password for every account. Seeded output is for demos only.