Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Security & Privacy

Random String Generator

Produce one or many random strings of any length from a preset or custom character set. Characters are drawn from crypto.getRandomValues with rejection sampling, so there is no modulo bias.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

Options

Your result will appear here

Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.

How it works

What it produces and how it comes back

Choose a length, a character set and how many strings you need; the result is the strings separated by newlines in a code view that saves as random-strings.txt. The stats line reports the resolved set size, the length used, the rounded entropy in bits and how many were generated.

Rejection sampling, not a modulo shortcut

Every character index comes from crypto.getRandomValues and is accepted only when it falls below the largest multiple of the set size, so no character is favoured. That differs measurably from simply taking a random 32-bit value modulo the alphabet length, which skews short sets such as the ten digits.

Presets, custom sets and silent clamping

Nine presets run from letters-only through hex to base64url, and the custom field collapses duplicates, so "aab" behaves like "ab"; an empty custom set is rejected. Length and count are clamped rather than refused, so asking for 5000 characters quietly yields 4096 and asking for 500 strings yields 200.

Entropy figures and where the bytes come from

The entropy shown is log2 of the set size multiplied by the length, so 32 alphanumeric characters reads as roughly 191 bits; it describes one string, not the whole batch. The workbench text area is unused, every parameter is an option, and no request is made — the values are drawn on your device.

Questions

How is bias avoided?

Each character index is read as an unsigned 32-bit integer; values in the short final block that would over-represent some characters are discarded and re-drawn (rejection sampling).

What happens with duplicate custom characters?

Duplicates are collapsed, so "aab" behaves like "ab". An empty custom set is rejected.

Is this suitable for tokens and salts?

Yes — the randomness comes from crypto.getRandomValues, the same CSPRNG used for cryptographic keys. The entropy figure shown is log2(set size) × length.

See category