Home › Generators › Random String Generator

Random String Generator

Make a random string in one click with this free random string generator. Choose the length and the characters it may use — letters, digits, symbols, or your own custom set — and get a fresh, unpredictable string for a password, a code, or test data. Everything is generated in your browser and never leaves your device.

Type your own characters to limit the string to just those. Leave it empty to use the checkboxes.

—
Press Generate string to make a random string.

How it works

A random string is built one character at a time. First the tool works out your character pool: the set of characters each position may use. If you typed a custom set, that is the pool. Otherwise it joins the groups you ticked — lowercase letters a to z, uppercase letters A to Z, digits 0 to 9, and symbols such as ! @ # $ % & *. With all four groups ticked, the pool holds 26 + 26 + 10 + 12 = 74 characters. If you also tick "exclude lookalikes", the tool removes 0, O, l, 1, and I from the pool, leaving 69 characters.

Then the tool picks one character at random for each position, using your browser's secure random number source when it is available, and falling back to the standard random source otherwise. Each pick is independent: the character in one position never affects the next, so the string has no pattern to spot or guess. A 16-character string from a 74-character pool has 74 raised to the power of 16 possible combinations — a number with 30 digits — which is why a random string is far stronger than a word, a name, or a birthday.

The length and the size of the pool work together. A short string from a small pool is weak: a 6-character string using only lowercase letters has about 300 million possibilities, which a computer can try quickly. The same 6 characters from all four groups has about 150 billion possibilities. And a 16-character string from all four groups is in a different league entirely. That is why the tool defaults to 16 characters with all four groups on, and why it shows the pool size under the result — so you can see at a glance how strong your string is.

Possible strings = pool size ^ length · e.g. 74 ^ 16 ≈ 2.5 × 10^29 possible strings

Use the "How many strings" control when you need several at once — for example, five temporary codes for five people, or three password candidates to choose from. The Copy button copies the first string, or all of them if you generated more than one. If no character group is ticked and no custom set is typed, the tool shows a friendly message instead of an empty result, because a string needs at least one character to draw from.

Worked example

Suppose you need a strong password for a new account. Set the length to 16, keep all four character groups ticked, leave "exclude lookalikes" off, and press Generate string.

Step 1: The tool builds the pool: 26 lowercase + 26 uppercase + 10 digits + 12 symbols = 74 characters.
Step 2: It picks 16 characters at random, one for each position, with no pattern.
Step 3: It shows the string and the detail line below it.

The result is a fresh 16-character string every time you press the button, and the detail line always reads the same way: "16 characters · 74 possible characters per position · about 8.1 × 10^29 combinations." Now try the same settings with a length of 8 instead. The pool is still 74 characters, but the detail line changes to "8 characters · 74 possible characters per position · about 9.0 × 10^14 combinations" — the same pool, but far fewer combinations, which is exactly why longer strings are stronger. Copy the 16-character string, save it in a password manager, and you have a password nobody can guess.

FAQ

What is a random string?

A random string is a jumble of characters with no pattern, picked by chance from a set you choose — for example, letters, digits, and symbols. Because there is no word or pattern to guess, a random string is hard for anyone else to predict, which is what makes it useful for passwords, codes, and one-off identifiers.

How long should my random string be?

For a password, 16 characters from letters, digits, and symbols is a strong choice. Shorter strings of 6 to 8 characters are fine for temporary codes, raffle tickets, or test data. Longer strings are always harder to guess: each extra character multiplies the number of possible strings, so going from 8 to 16 characters makes a string enormously stronger.

Can I use the strings as passwords?

Yes. A random string of 16 or more characters with upper and lower case letters, digits, and symbols makes a strong password. Save it in a password manager rather than writing it on paper, and never reuse the same password on two important accounts. This page generates the string in your browser, so it is never sent anywhere.

What does the custom character set do?

The custom character set lets you type the exact characters the string may use, instead of the preset groups. For example, type ABC123 to get strings made only of A, B, C, 1, 2, and 3. When you type anything in the custom box, it replaces the checkboxes above it, so the string uses only your characters.

What does exclude similar characters mean?

It removes characters that look alike in many fonts, such as the digit 0 and the letter O, the digit 1 and the letters l and I. That helps when someone has to read the string aloud or type it from a printed page, because those lookalikes are the most common source of typos.