📖 Overview
The Password Generator API creates cryptographically secure passwords with customizable complexity options. Built with security best practices, it provides reliable password generation for applications requiring strong authentication.
🔒 Cryptographically Secure
Uses PHP's secure random_bytes() function for true randomness
⚙️ Customizable Character Sets
Control uppercase, lowercase, numbers, and special characters
📊 Password Strength Analysis
Automatic strength scoring and detailed feedback
📏 Flexible Length
Generate passwords from 4 to 128 characters long
🌐 Base URL
🔐 Authentication
No authentication required. This is a public API that can be accessed without any API keys or tokens.
📡 API Endpoints
POST / Generate Password
Generate a cryptographically secure password with customizable options.
Request Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
min_length |
integer | Optional | 8 | Minimum password length (1-128 characters) |
max_length |
integer | Optional | 16 | Maximum password length (1-128 characters) |
count |
integer | Optional | 5 | Number of passwords to generate (1-100) |
include_uppercase |
boolean | Optional | true | Include uppercase letters (A-Z) |
include_lowercase |
boolean | Optional | true | Include lowercase letters (a-z) |
include_numbers |
boolean | Optional | true | Include numbers (0-9) |
include_symbols |
boolean | Optional | false | Include special characters (!@#$%^&*) |
exclude_ambiguous |
boolean | Optional | false | Exclude ambiguous characters (0,O,l,1,i,I) |
no_repeated_chars |
boolean | Optional | false | Prevent repeated characters in password |
must_include_each_type |
boolean | Optional | true | Ensure at least one character from each selected type |
custom_symbols |
string | Optional | "" | Custom symbol set to use instead of default |
Example Request - Basic Password
Example Request - High Security Password
Example Request - Multiple Passwords
📊 Response Format
Success Response
Single Password Response
Multiple Passwords Response
Error Response
💪 Password Strength Analysis
Each generated password includes automatic strength analysis based on length, character variety, and entropy.
Score | Level | Description |
---|---|---|
1 | Very Weak | Short length, single character type |
2 | Weak | Short length, limited character variety |
3 | Moderate | Adequate length, good character variety |
4 | Strong | Good length, multiple character types |
5 | Very Strong | Long length, all character types, high entropy |
⚠️ Error Codes
Code | Description |
---|---|
INVALID_LENGTH |
Password length is outside the valid range (4-128) |
NO_CHARACTER_SETS |
At least one character set must be enabled |
INVALID_COUNT |
Password count is outside the valid range (1-10) |
GENERATION_ERROR |
Error occurred during password generation |
🛡️ Security Features
- Cryptographically Secure: Uses PHP's
random_bytes()
for true randomness - No Logging: Generated passwords are not stored or logged anywhere
- HTTPS Only: All communications are encrypted
- High Entropy: Calculated entropy values help assess true password strength
- Similar Character Exclusion: Option to exclude visually similar characters
🚦 Rate Limits
Currently, there are no rate limits imposed on this API. However, please use it responsibly and avoid excessive requests that might impact service availability for other users.
🎯 Ready to Try?
Test the Password Generator API with our interactive web interface or start integrating it into your application.
Try Web Interface Test API Endpoint