Random String Generator

Generate secure random strings for passwords, tokens, API keys, and unique IDs.

1256
{{ charsetError }}
Results
  • {{ s }}
    Creating secret…
    {{ secretState[i].link }} Expires {{ secretState[i].expires_at }} Β· readable once
    Free limit reached. Sign in for more free secrets.
    Free limit reached (10/10). Subscribe for unlimited secrets.
    Something went wrong. Try again.

What Is a Random String Generator?

A random string generator creates strings of characters chosen at random from a pool you define. Every character is picked independently, so the output is unpredictable and suitable for security-sensitive applications.

Common Use Cases

  • Passwords β€” mix uppercase, lowercase, digits, and symbols for strong passwords.
  • API keys & tokens β€” long alphanumeric strings that are hard to guess or brute-force.
  • Session IDs β€” unique identifiers that expire and cannot be predicted.
  • Test data β€” fill database fields or forms with random values during development.
  • Unique slugs & codes β€” short promo codes, referral IDs, or order numbers.

How Does This Tool Generate Random Strings?

This tool uses the browser's built-in crypto.getRandomValues() API β€” a cryptographically secure pseudo-random number generator (CSPRNG). Unlike Math.random(), which is not suitable for security purposes, crypto.getRandomValues() produces values that are statistically unpredictable and safe for generating passwords and tokens.

How Long Should My Random String Be?

For passwords: at least 16 characters mixing all sets. For API tokens and session IDs: 32–64 characters of alphanumeric characters. For UUIDs or correlation IDs: 32 hex characters is standard. The longer the string, the more entropy it has and the harder it is to brute-force.

What Are Ambiguous Characters?

Characters like 0 (zero) and O (capital letter O), or l (lowercase L) and 1 (one), look similar in many fonts. Excluding them makes strings easier to read, type, or communicate verbally β€” useful for activation codes or printed passwords.