
Password Generator API
Generate secure passwords instantly with full customization. Create strong, random passwords with specific character requirements for all your accounts.
All API requests require a valid API key passed in the Authorization header as a Bearer token.
120 requests per minute
1 endpoint available
Overview
Generates one random password. The password holds at least the requested number of each character type, is filled up to the requested length from all allowed characters, and is then shuffled.
Randomness
Characters are chosen with the server's cryptographically secure random generator (Node crypto) using
rejection sampling, so every allowed character is equally likely. The password is not stored or logged, and the
response is sent with Cache-Control: no-store.
Character sets
- Uppercase: A-Z
- Lowercase: a-z
- Numbers: 0-9
- Symbols:
!@#$%^&*()_+-=[]{}|;:,.<>? - excludeSimilar removes i, l, 1, 0, I, L and |.
- excludeAmbiguous removes these symbols:
{ } [ ] ( ) / ' " ~ , ; . : < >
Limits
- length is 4 to 128. Each minimum is 0 to 10.
- The four minimums added together cannot be more than length, otherwise you get a 400.
Endpoints
https://opentools.ca/api/v1/tools/password-generatorRequest Body
Content-Type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
| length | number | Optional | Password length, an integer from 4 to 128.Default: 12 |
| minUppercase | number | Optional | Minimum uppercase letters, an integer from 0 to 10.Default: 1 |
| minLowercase | number | Optional | Minimum lowercase letters, an integer from 0 to 10.Default: 1 |
| minNumbers | number | Optional | Minimum digits, an integer from 0 to 10.Default: 1 |
| minSymbols | number | Optional | Minimum symbols, an integer from 0 to 10.Default: 1 |
| excludeSimilar | boolean | Optional | Leave out look-alike characters: i, l, 1, 0, I, L and |.Default: false |
| excludeAmbiguous | boolean | Optional | Leave out hard-to-type symbols such as braces, brackets, slashes and quotes.Default: false |
Response Example
{
"success": true,
"password": "Kx9#mPq2$Nw5",
"length": 12
}Error Codes
Code Examples
# A 16-character password with at least 2 of each type
curl -X POST https://opentools.ca/api/v1/tools/password-generator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"length": 16, "minUppercase": 2, "minLowercase": 2, "minNumbers": 2, "minSymbols": 2}'
# A password without look-alike or hard-to-type characters
curl -X POST https://opentools.ca/api/v1/tools/password-generator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"length": 12, "excludeSimilar": true, "excludeAmbiguous": true}'Rather use it in your browser? Open the Password Generator