Quick access

Saved in this browser. Sign in to keep it on all your devices.

Random String Generator

Generate random strings for passwords, tokens, API keys, and more.

characters

Options

8 64 128

Quick Presets

Cryptographically Secure

Uses browser's native random generation for unpredictable strings.

Instant Generation

Generate multiple strings instantly with presets or custom settings.

Privacy First

All generation happens locally. Your strings never leave your device.

128
Max Length
4
Presets
5
Char Sets
0
Data Stored
Version 1.1 Updated What's new

Release notes

  1. v1.1 Latest
    • Added an in-depth guide below the tool, written from what the tool actually does.

About the Random String Generator

The random string generator creates unpredictable strings of letters, numbers, and symbols using your browser’s secure random number generator.

How to use it

  1. 1 Set the length you need.
  2. 2 Choose the character sets.
  3. 3 Copy the result.

Frequently asked questions

Are these strings secure enough for API keys?

Yes. They use crypto.getRandomValues. For a secret key, use at least 32 characters.

How many possible strings are there?

For a 32-character string of letters and digits there are 62^32, about 2 × 10^57, possible values.

Are the strings stored?

No. They are made in your browser and never sent to our server.

How much security each character adds

Strength is measured in bits of entropy: the string length multiplied by log2 of the number of characters allowed. Each extra bit doubles the number of possible strings.

  • Digits only (10 characters): 3.32 bits each.
  • Lowercase only (26): 4.70 bits each.
  • Letters and digits (62): 5.95 bits each, so 16 characters give about 95 bits and 32 give about 190.
  • Letters, digits and the 26 symbols here (88): 6.46 bits each.

About 128 bits is far beyond any realistic guessing attack, which works out to 22 characters of letters and digits.

What each preset produces

  • Alphanumeric: 16 letters and digits, about 95 bits.
  • Strong: 24 characters with symbols and without look-alikes, drawn from 83 characters for about 153 bits.
  • API: 32 uppercase letters and digits without look-alikes. That leaves exactly 32 characters, worth 5 bits each, for 160 bits.
  • UUID: a standard version 4 identifier with 122 random bits. The length and character options do not apply to it.

Why the source of randomness matters

Each character comes from crypto.getRandomValues, the secure generator built into your browser. JavaScript’s Math.random is designed for speed and its output can be predicted, so it should never produce secrets.

Dividing a random number by the alphabet size can favor some characters slightly. To avoid that, values above the last whole multiple of the alphabet size are thrown away and drawn again, which keeps every character equally likely.

Choosing characters that will not cause trouble

Symbols add little and can break things. A $ can expand in a shell, & splits a URL query, and quotes can end a value in a config file. For environment files, links and database passwords, a longer string of letters and digits is usually the safer choice.

Turn on Exclude ambiguous when someone has to read or type the code, since 0, O, 1, l and I are easy to confuse on paper. Store real secrets in a secrets manager rather than in chat or email.