• Free forever
  • No sign-up
  • Private — runs in your browser

Random String Generator

Secure random alphanumeric strings for API keys, tokens and secrets — any length, one or fifty at a time.

16

Settings for common uses

UseSuggested setup
API key or secret token32–64 characters, letters + numbers
Session or CSRF token32+ characters, letters + numbers
Coupon or invite code8–12 characters, uppercase + numbers, exclude similar
Test data / unique slugs8–16 characters, lowercase + numbers

A 32-character alphanumeric string has about 191 bits of entropy — far more than the 128 bits usually recommended for secrets.

Is it really random?

Yes. Characters are drawn with crypto.getRandomValues, the browser's cryptographically secure generator, using rejection sampling so every character is equally likely. Nothing is sent to a server. Math.random(), by contrast, is not suitable for secrets.

In code

  • Python: secrets.token_urlsafe(32)
  • Node.js: crypto.randomBytes(24).toString('base64url')
  • OpenSSL: openssl rand -hex 32

Related

← Back to the full Strong Password Generator