ToolGlint

Random String Generator

Generate random strings and numbers with a custom length, character set and count. Free and runs in your browser.

Runs in your browser. Nothing you enter is uploaded or stored.

How to use the Random String Generator

  1. Choose Strings or Numbers at the top.
  2. Press a Quick start button for a common kind, such as Hex, a 6-digit code or a dice roll, or set the options yourself.
  3. For strings, set the length and how many you want, then tick the kinds of character to use.
  4. Tick the look-alikes option to leave out 0, O, 1, l and I, or type characters of your own to add.
  5. For numbers, set the lowest and highest value and how many you want. Tick No repeats to get each number once at most.
  6. In a string, digits are shown in blue and symbols in red so they are not misread. The line under the result says how many characters or numbers it was drawn from.
  7. Click a result to copy it, or press Generate for a new set.

Questions and answers

Are the results really random?
They come from your browser’s cryptographic random number generator, the same source used to create encryption keys. Every character and every number in the range is equally likely. This is much stronger than the ordinary random function found in most programming languages.
Are the strings sent to a server?
No. Everything is generated in your browser. Nothing is uploaded, stored or logged, so the tool does not know what it gave you.
Can I use these strings as passwords or API keys?
The randomness is strong enough. A 32-character string of letters and digits is suitable for a token or a secret key. For a password you will type, our Password Generator is the better choice: it can guarantee a mix of character kinds and shows the strength.
How long should a random string be?
It depends on what it protects. With letters and digits, 16 characters give about 95 bits of randomness, enough for most identifiers and tokens. Use 22 or more for something that must never be guessed, such as a session secret. For a short code a person reads out, 6 to 8 characters with look-alikes left out works well.
How do I pick lottery numbers or a random winner?
Switch to Numbers, set the range, set how many you need and tick No repeats. For six numbers from 1 to 49, enter 1, 49 and 6. To pick a winner from a numbered list, set the range to the size of the list and ask for one number.
What range of numbers is supported?
Whole numbers from about minus nine quadrillion to plus nine quadrillion, the largest range a browser can handle exactly. You can generate up to 1,000 at a time.

Related tools