Password Generation
The /password endpoint generates one or more passwords using cryptographically secure randomness (crypto.randomInt). Supports two modes: random (character-based) and passphrase (word-based). Each response includes the generated passwords along with their strength rating and entropy score.
Use Cases
Generate secure passwords for users during account creation, produce passphrases for easier memorization, test password strength UI, or seed test fixtures with realistic credentials.
curl -X GET \ "https://api.moxon.dev/v6/password"Send the request to see the response here.
type"random" | "passphrase"optionalDefault:
random.Generation mode:
random(character-based) orpassphrase(word-based).lengthnumberoptionalDefault:
16.Character count for
randommode (8–128), or word count forpassphrasemode (3–10).uppercase"true" | "false"optionalDefault:
true.Include uppercase letters (
A–Z). Set tofalseto disable.lowercase"true" | "false"optionalDefault:
true.Include lowercase letters (
a–z). Set tofalseto disable.digits"true" | "false"optionalDefault:
true.Include digits (
0–9). Set tofalseto disable.symbols"true" | "false"optionalDefault:
false.Include symbols (
!@#$%^&*()-_=+[]{}|;:,.<>?). Set totrueto enable.excludestringoptionalDefault:
"".Characters to remove from the charset (e.g.
exclude=0Ol1).countnumberoptionalDefault:
1.Number of passwords to generate (1–20).
separatorstringoptionalDefault:
-.Word separator for
passphrasemode.
passwordsstring[]List of generated passwords or passphrases
typestringGeneration mode used:
randomorpassphraselengthnumberCharacter count (random) or word count (passphrase)
strengthstringStrength rating:
weak,moderate,strong, orvery_strongentropynumberShannon entropy in bits (rounded to 1 decimal place)
| Strength | Entropy range |
|---|---|
weak | < 40 bits |
moderate | 40 – 59.9 |
strong | 60 – 79.9 |
very_strong | ≥ 80 bits |
- 400
Type must be "random" or "passphrase"Thetypeparameter is not a supported value - 400
Length must be between 8 and 128Thelengthparameter is out of range forrandommode - 400
At least one character set must be enabledAll character sets are disabled orexcluderemoved all characters - 400
Count must be between 1 and 20Thecountparameter is out of the allowed range
Last updated on September 12, 2026