§ Tool 15 of 23 · Generate

Random, but secure.

Cryptographically secure random strings via SecRandomCopyBytes with rejection sampling — no modulo bias, no off-by-one. Five presets cover the daily cases; advanced rules enforce per-class minimums for strict policies.

Updated
v2.9
First shipped
Presets
Five
Password · API key · hex · PIN · readable
Source
SecRandomCopyBytes
Rejection sampling
Bulk
Up to 20
Per generation
DevUtilities Random String Generator — preset picker, character classes, requirements, output list.
Plate xv — Random String with the preset picker and the per-class minimum rules.
§ 01Capabilities

Seven things it does carefully.

i

Five presets

Strong Password (16), API Key (32), Hex String (64), PIN Code (6 digits), Readable Code (no ambiguous characters). Pick and go.

ii

Customisable charset

Toggle uppercase, lowercase, digits, symbols. Compose your own pool when the presets don't fit.

iii

Length 1 – 100

From 4-digit PIN to a 100-character secret. Set the length once; the generator obeys.

iv

Per-class minimums

Enforce "at least 2 digits" or "at least 1 symbol" — the kind of rule strict password policies still require.

v

Bulk generation

Up to 20 strings per click. Output as a list, copy individually or all at once.

vi

Rejection sampling

Drawing from SecRandomCopyBytes with rejection sampling eliminates modulo bias — every character has equal probability.

vii

State persistence

Length, charset, and rule preferences stick across sessions.

§ 02A typical session

Four moves to a fresh secret.

Pick a preset

Or choose "custom" and toggle character classes by hand.

Preset

Set length and rules

Length, plus minimum counts per class if you need them.

Length · rules

Generate

One string or twenty. Sub-second, even at 100 characters × 20.

Generate

Copy

One-click copy on each, or "copy all" for the whole list.

Copy · ⌘ C
§ 03Made for these tasks

The work it actually does.

i — Auth

Strong passwords

Generate one for the user account you're creating; remember to store it somewhere.

ii — API

Secret keys

Mint API keys, service tokens, and webhook secrets with the right entropy.

iii — DB

Test fixtures

Bulk-generate IDs, slugs, and tokens for seed scripts.

iv — Identity

OAuth state

Generate state and nonce values for OAuth flows.

v — Read

Readable codes

The Readable preset omits ambiguous characters — useful when humans will read or type the result.

vi — Crypto

HMAC keys

Generate hex strings of the right length for HMAC-256/384/512 secrets.

§ 04Questions, answered

Things people ask before they download.

Where does the randomness come from?

From SecRandomCopyBytes, the macOS CSPRNG. Suitable for passwords, API keys, and security tokens.

Is there modulo bias?

No. The generator uses rejection sampling — drawing more bytes than strictly needed and discarding values that would skew the distribution.

What's in each preset?

Strong Password: 16 chars, all classes. API Key: 32 chars, alphanumeric. Hex String: 64 hex chars. PIN: 6 digits. Readable: no 0/O, 1/l/I, etc.

Can I enforce minimums per class?

Yes. Toggle "at least N digits / uppercase / symbols" — the generator re-rolls until the constraint is met (or warns if the constraint is impossible for the chosen length).

How many at once?

Up to 20 per generation. The whole list copies in one click.

Are generated strings stored?

Only in your local session, until you regenerate. Nothing leaves your machine.

§ 05Companion tools

Better with the rest of the shelf.

§ Download

Cryptographically secure, preset-friendly.

Download — Mac App StoreChangelog