Pattern Generator
Describe the structure, not just the length: licence keys, coupon codes, test data.
Fair0 bitsGenerated in your browser
Examples
Syntax
- l u d s a
- lowercase, uppercase, digits, symbols, alphanumeric
- h H
- hex lowercase / uppercase
- c v
- consonants / vowels
- w
- word from the Diceware list
- [A-Z0-9]
- explicit character set
- {4} {8,12}
- repetition, fixed or a uniform range
- ( ) ( )~
- group, optionally shuffled
- \d
- literal character instead of a class
A range such as a-z is only allowed within one class: digits, a-z or A-Z. Write \- for a literal dash.
A pattern defines what each position draws from. The entropy shown is computed position by position rather than estimated from an overall length. Literal characters contribute nothing, and shuffled groups deliberately get no bonus — an understated entropy is a cosmetic flaw, an overstated one is a security defect.
Frequently asked questions
For values with a required structure: licence keys in groups of five, coupon codes with a fixed prefix, test data in a particular format. Instead of a length alone, you define what each position is drawn from.
l u d s stand for lower case, upper case, digits and symbols, a for alphanumeric, h and H for hex, c and v for consonants and vowels, and w for a word from the word list. On top of that you can use explicit sets such as [A-Z0-9], repetitions such as {4} or {8,12}, and groups in parentheses.
Yes, every constraint narrows the space of possible results. That is why the readout computes entropy position by position instead of estimating it from the total length: fixed characters count as zero, and mixed groups deliberately get no bonus.