generate random string
This block is part of the value group and was last modified in core v15.0.0.
generate random string v15.0.0 Generates a cryptographically random string from an alphabet you choose. Use it for human-facing codes (claim, invite, voucher) where the alphabet has to exclude lookalike characters. Every character of the alphabet is equally likely.
- alphabet
valueThe characters to pick from. Defaults to
0123456789ABCDEFGHJKLMNPQRSTUVWXYZ: digits and uppercase letters without the lookalikesIandO. - length
numberHow many characters to generate. Maximum 4096.
- value
value - error
valueNO_ALPHABETwhen the alphabet is empty,INVALID_LENGTHwhen the length is zero or negative.
Uniform (rejection-sampled) crypto-random string from the given alphabet; the default alphabet is digits plus uppercase letters WITHOUT I and O. length defaults to 8 and is SILENTLY capped at 4096. Empty alphabet -> value "" and error "NO_ALPHABET"; zero or negative length -> value "" and error "INVALID_LENGTH"; on success error is nil.
random string |
random code |
voucher code |
claim code |
custom shortid |
A typical wiring for generate random string: number feeds the length pin; value feeds the alphabet pin; the value out pin feeds convert to uppercase.

Commonly used with
In production blueprints, this block is most often wired together with:
- set fields: this block feeds into it. Generates an array of mutations based on the given filled fields.
- number: feeds into this block. Generates a valid number from the filled custom value in the blueprint.
- value: feeds into this block. Simply returns the provided value.
Version history
Introduced in v15.0.0.
Back to
value Return to the main group to view all sub-groups Back to value Return to the group to view all blocks within this group
