Free tools that run in your browser. Use any tool without an account.

Favourites Cart
Sign in
Join free

Random String Generator

  • Free
  • Runs in your browser
  • No account needed

This browser tool generates cryptographically strong random strings using crypto.getRandomValues and rejection sampling. For example, 16 characters from a 62-character set give about 95.2 bits of entropy (16 × log2(62)).

Random strings
Check your input
Characters to pick from
-
Possible strings
-
Randomness per string
-

If you ask for more unique strings than the length and set allow (for example 1,000 strings of 2 digits), you get fewer lines.

Runs in your browser. Your files and values are not sent to us. Report a problem
Advertisement

About the Random String Generator

This tool makes random strings in your browser. You pick length, how many, and the character set (letters, numbers, hex, symbols or a custom set). Results update instantly as you type and nothing is uploaded. The tool uses crypto.getRandomValues with rejection sampling so each character is equally likely. The page also shows how many possible strings exist and the randomness in bits for each string. You can copy results or share a link that reopens with the same inputs. If you ask for more unique strings than the character set and length allow, the tool returns fewer lines. Use this for test data, tokens, non-critical keys, or dev work. For production cryptographic keys follow platform key management and NIST guidance.

How to use it

  1. 1Choose Characters from the preset list or enter Your characters.
  2. 2Set Length and How many to generate.
  3. 3Toggle No duplicates if you need unique lines.
  4. 4Copy the result or share the link to reopen with the same inputs.
Advertisement

Worked example

Input: Length = 2, How many = 1000, Characters = Numbers only (0-9), No duplicates = Yes. Result: Possible strings = 10^2 = 100. The tool returns 100 lines, not 1000. Randomness per string = 2 × log2(10) ≈ 6.64 bits.

How it works

Each character is picked from your chosen set with crypto.getRandomValues and rejection sampling, so every character is equally likelyPossible strings = (characters in the set) to the power of the length; randomness in bits = length x log2(characters in the set)With "no duplicates" on, a string already in the list is drawn again

Source: NIST SP 800-63B: Digital Identity GuidelinesRFC 4086: Randomness Requirements for SecurityOnePassword random string explanation and examples. Last checked 5 November 2026.

What it is good for

  • Runs entirely in your browser; nothing is uploaded.
  • Shows possible strings and entropy in bits instantly.
  • Uses the browser CSPRNG crypto.getRandomValues with rejection sampling.
  • Not a hardware true-random source like random.org; it uses the browser CSPRNG.
  • If you request more unique strings than the pool allows, you will get fewer lines.
Advertisement

Questions people ask

Is this safe for generating passwords or API keys?

The tool uses crypto.getRandomValues in your browser, which is a CSPRNG. That makes it suitable for many keys and tokens, but for high-value secrets follow your platform key management and NIST guidance.

How does the tool calculate bits of randomness?

It uses the formula bits = length × log2(character-set size). For example, 16 characters from 62 symbols give about 95.2 bits (16 × log2(62)).

What happens if I ask for more unique strings than possible?

If your requested count exceeds the total possible strings, the tool returns fewer lines. Example: 1,000 strings of 2 digits gives only 100 unique lines.

Does anything get sent to a server?

No. Generation runs in your browser and results update instantly as you type. Nothing is uploaded unless you choose to copy or share a link yourself.

Can I use a custom character set?

Yes. Pick My own characters and type the exact characters you want used. The tool counts those characters when it computes possible strings and bits.

How do I check this is a cryptographically secure generator?

Look for crypto.getRandomValues or CSPRNG wording. This tool uses crypto.getRandomValues with rejection sampling, which gives uniform picks over the chosen set. For formal assurance follow NIST standards.

Help keep every tool free

FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.

Advertisement
Advertisement