Code · Made a little simpler

Secure Random String Generator

Generate up to 50 browser-local random strings from nine built-in alphabets or your own distinct Unicode characters. See the theoretical bits per string and copy individual values or the batch.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

62 choices per character · 190.5 theoretical bits per string

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

Secure Random String Generator: how to use it

  1. Choose an alphabet, or enter the exact characters you want in a custom alphabet.
  2. Set a whole length and batch count. Review the number of possible choices at each position.
  3. Generate strings, then copy one value or save the batch as newline-separated UTF-8 text.

Limits and notes

Accepts 1–4,096 Unicode code points per string and 1–50 strings. Custom alphabets allow at most 512 entered code points, with 2–256 distinct choices after deduplication. Control characters, line separators and broken Unicode are rejected. Results stay in memory until settings change or you clear or leave the page. Clipboard and downloaded copies remain under your control.

How your privacy works →

Secure Random String Generator: common questions

How are the random characters chosen?

The browser supplies random 32-bit integers through crypto.getRandomValues(). The generator discards the final incomplete group before indexing, so each unique character has the same selection probability.

What does the theoretical bits figure mean?

For independent uniform draws it is the length times log₂ of the alphabet size. An alphabet of 16 characters contributes four theoretical bits to each position. This expresses the size of the possible output space under the model.

Does the Base64url alphabet encode bytes?

Each position is chosen directly from the 64 URL-safe characters. A receiving service that expects RFC 4648 encoding of a specific byte count has its own encoding and padding rules.

Can two generated strings be the same?

Yes. Each string is generated independently. Short lengths and small alphabets make duplicates more likely. The tool does not enforce uniqueness.

Guides