Free random string generator

Random string generator the moment the page opens

Pick a length and the characters you need. A secure random string appears at once, and one tap copies it to your clipboard.

  • Free, no sign-up
  • Made in your browser, never sent
  • Result in a split second

From a length to a copied string in four moves

Change any setting and the string is redrawn straight away, so you see what you will copy.

  1. Step 01

    Type how long it should be

    Any whole number from 1 to 512. A number outside that range snaps to the nearest limit.

  2. Step 02

    Tick the characters you want

    Lowercase letters, capitals, digits and symbols can be mixed freely, as long as one set stays on.

  3. Step 03

    Choose how many strings

    Ask for up to 20 values at once and get one per line, handy for test data and batches of codes.

  4. Step 04

    Press Generate, then Copy

    Generate draws a fresh batch. Copy puts every line on your clipboard and the button says Copied.

What you get with every string

  • A string already waiting when the tool opens, with no extra click
  • Any length from 1 to 512 characters
  • Four character sets you can switch on and off independently
  • Up to 20 strings per batch, one per line
  • A secure random source built into your browser, with every character equally likely
  • One-tap copying of the whole result
  • Your length, sets and count remembered for next time

How a secure random string is made

entropy (bits) = length × log2(pool size)
pool size — number of different characters you allow · length — characters in the string

A random string is a sequence of characters picked one at a time, each from the same pool and each independent of the others. This tool draws every character with the Web Crypto API, the source browsers use for encryption keys, instead of the weaker generators meant for games and animations. Nothing is fetched from a server, so the string exists only on your screen.

Picking fairly takes care. A random 32-bit number rarely divides evenly by the size of your pool, and a plain remainder would make the first few characters slightly more likely than the rest. The generator discards values from the uneven top slice and draws again, so every character in the pool has exactly the same chance at every position.

Strength depends on two things: how many different characters the pool holds and how many you pick. Entropy in bits is the length times the base-2 logarithm of the pool size. Lowercase letters give a pool of 26, capitals double it to 52, digits bring it to 62, and the symbol set adds 23 more for 85. Every extra bit doubles the number of possible strings, so a longer string usually helps more than one more set.

Filling in the form is simple. Length takes a whole number from 1 to 512; an empty or non-numeric field falls back to 16. Tick the character sets you need, and at least one must stay on. Count produces from 1 to 20 strings at once, one per line, and Copy takes all of them. Generate draws a new batch from the current settings, and changing any field does the same.

What is saved. Only your settings stay in this browser: the length, the ticked sets and the count. The strings themselves are never stored, logged or passed to analytics, so reopening the page gives you a new string made with the same settings.

Worked example: how much entropy a string carries

These figures come from the formula above, computed for a few common choices. Every row is the same string length of 16 unless stated.

16 digits (pool of 10)53.2 bits
16 lowercase letters (pool of 26)75.2 bits
16 letters and digits (pool of 62)95.3 bits
32 letters and digits (pool of 62)190.5 bits

Doubling the length doubles the bits, while moving from digits to letters and digits adds about 42.

What this generator is not for

  • It makes plain random strings. It does not judge how strong a password is or check it against known leaks.
  • Strings are not stored anywhere. Once you generate again or close the tab, the earlier value cannot be brought back.
  • The pool is limited to the four built-in sets. Custom alphabets, patterns and repeatable seeded output are not offered.

Random string questions

Is the string really random?

Yes. Each character comes from the cryptographic random source built into your browser, the same one used to create encryption keys, not from a simple math function.

Does the string leave my device?

No. It is created and shown on this page only. It is not sent to a server, not written to a log and not included in analytics events.

How long should a random string be?

It depends on the job. Sixteen letters and digits carry about 95 bits, which suits most tokens and test values. Use 32 or more for secrets that must be hard to guess.

Which symbols are in the symbols set?

The set holds 23 characters: ! @ # $ % ^ & * ( ) - _ = + [ ] { } ; : , . ? Turn it off if the place you paste into rejects some of them.

Why can I not turn off every set?

With no characters to choose from there is nothing to generate. The tool tells you so and keeps Generate and Copy unavailable until you tick at least one set.

What happens if Copy does not work?

Some browsers block clipboard access. The result is then selected for you and a hint asks you to press Ctrl+C, or Cmd+C on a Mac.

Need a fresh random value?

Set the length once and copy a new string whenever you want one.

Generate my string

About ToolperLast updated: Privacy