+Password Generator Plus
Developers

JavaScript password generator

See how to generate passwords in browser-side JavaScript.

RUNS IN YOUR BROWSER
How secure is this password?Not rated yet

This is an estimate, not a guarantee. A reused or shared password can still put an account at risk.

Ready

Settings

Each selected character type appears at least once. Use a long, unique password and save it in a password manager.

◈ Runs in your browser◎ No account needed↗ Copy when you’re ready
QUICK START

Building a website or app? Try the generator first, then inspect the JavaScript example.

  1. Try the browser demo.
  2. Read the explanation and example further down.
  3. Download the example if you want to adapt it for your project.

The downloadable example is teaching material. The demo on this page runs in your browser.

How it works

Choose settings that fit the account

Start with the account’s length and character rules. Each selected character type appears at least once. You can exclude look-alike characters (0O1Ilio) or punctuation that is awkward to type. Generate a new password after any change.

Use a new password for every account and save it in a password manager. The strength estimate checks common patterns, but it does not calculate exact entropy or guarantee safety. Short passwords remain risky even when they mix several character types.

Original JavaScript example

The downloadable MIT-licensed example uses rejection sampling and a cryptographic shuffle. It includes every default character type, rejects invalid lengths, and requires a secure browser context. The live demo uses the site’s shared browser engine.

import { generatePassword } from '/examples/password-generator.js';
const password = generatePassword(16);
// Keep it in your tool document; never log or put it in a URL.
Download the example module

What happens to your input?

This tool does its work on this page. The site does not submit your entries or results or keep a history. However, any script allowed to run on the page could read its fields. Clearing the tool or leaving the page cannot erase clipboard entries, downloads, printouts, or screenshots. It also cannot protect you if your browser or device is compromised. Read the privacy limits.

Keeping a result safe after generation →