Password Generator

Password Generator API

Security

Generate secure passwords instantly with full customization. Create strong, random passwords with specific character requirements for all your accounts.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Rate Limit

120 requests per minute

Endpoints

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

POST
https://opentools.ca/api/v1/tools/password-generator
Generate a random password with custom requirements

Request Body

Content-Type: application/json

ParameterTypeRequiredDescription
length
number
OptionalPassword length, an integer from 4 to 128.Default: 12
minUppercase
number
OptionalMinimum uppercase letters, an integer from 0 to 10.Default: 1
minLowercase
number
OptionalMinimum lowercase letters, an integer from 0 to 10.Default: 1
minNumbers
number
OptionalMinimum digits, an integer from 0 to 10.Default: 1
minSymbols
number
OptionalMinimum symbols, an integer from 0 to 10.Default: 1
excludeSimilar
boolean
OptionalLeave out look-alike characters: i, l, 1, 0, I, L and |.Default: false
excludeAmbiguous
boolean
OptionalLeave 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

400
Bad Request - A value is out of range, or the minimums add up to more than length
401
Unauthorized - Invalid or missing API key
403
Forbidden - API key is inactive or expired, or the request IP is not allowed for this key
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error

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}'

Ready to get started?

Create an API key to start using the Password Generator API.

Rather use it in your browser? Open the Password Generator