Random String Generator

Build a random string from an alphabet you choose.

Use this tool

Result

The result appears in this panel after you run the tool.

About this tool

Each position is one character from the alphabet, chosen with the browser’s random source. The result is text you can copy.

Password Generator is the stricter page: it starts at 8 characters and drops easily confused glyphs.

How to use it

  1. Choose the length, from 1 to 256.
  2. Choose the alphabet.
  3. Generate the string.

Limitations

Alphabet index from a random byte

Length and the four selectable alphabets

Lengths are integers in the inclusive band 1..256. The control starts at 16. Each output character is alphabet[byte % alphabet.length], where the byte comes from crypto.getRandomValues, one byte per character. The selectable sets are alphanumeric, hex, a printable set labeled ASCII, and binary. Alphanumeric is letters and the digits 2 through 9, without capital i, without capital o, and without the ell, and also dropping 0 and 1. Hex is 0-9 and a-f, so it does include the digits the alphanumeric set drops. Binary is the two characters 0 and 1. The printable set adds !@#$%*-_ onto the alphanumeric letters and digits. An unknown alphabet id falls back to alphanumeric inside the function. There is also a letters-only table in the function, but this page’s menu leaves that table unused.

Hex length 16 and binary length 2 both divide 256, so those two maps do not add modulo bias. The other lengths do: a few symbols win an extra residue slot. For a long token that is acceptable on this page. That tilt is not an invitation to treat the string as a diceware passphrase.

An identifier or a fixture, not a passphrase policy

Use the result when a test fixture, a request id, or a sample token needs a chosen alphabet and a chosen length, including lengths shorter than 8. The password page is the one that starts at 8 characters, defaults to the symbol set, and is aimed at secrets. This page will happily emit one hex nibble or a 256-character string. It does not mix in a separator, a checksum digit, or a version nibble the way a UUID does. The same click never repeats by design of the random source, but the page does not store history to enforce that.

What the bytes are not

The draw is not Math.random. It is not a digest taken over the clock, and it does not conceal a phrase you typed. There is no input text to protect. The string is the secret or the id, visible on screen for copying. Analytics does not receive it. If you needed a digest of some other document, hashing that document is a different operation: same input, same digest. Here the same click is not supposed to match the previous click.

Privacy

Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.