🔐 Password Generator API

Generate cryptographically secure passwords with customizable complexity

📖 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

🛡️ Cryptographically Secure 🎯 Zero Logging ⚡ High Performance

🌐 Base URL

https://api.lorwongam.com/api/password-generator/

🔐 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

curl -X POST "https://api.lorwongam.com/api/password-generator/" \ -H "Content-Type: application/json" \ -d '{ "min_length": 12, "max_length": 16, "include_uppercase": true, "include_lowercase": true, "include_numbers": true, "include_symbols": false }'

Example Request - High Security Password

curl -X POST "https://api.lorwongam.com/api/password-generator/" \ -H "Content-Type: application/json" \ -d '{ "min_length": 24, "max_length": 24, "include_uppercase": true, "include_lowercase": true, "include_numbers": true, "include_symbols": true, "exclude_ambiguous": true, "must_include_each_type": true }'

Example Request - Multiple Passwords

curl -X POST "https://api.lorwongam.com/api/password-generator/" \ -H "Content-Type: application/json" \ -d '{ "min_length": 12, "max_length": 12, "include_uppercase": true, "include_lowercase": true, "include_numbers": true, "include_symbols": true, "count": 5 }'

📊 Response Format

Success Response

Single Password Response

{ "success": true, "data": { "password": "Kx7mN9pQw2Yv8zR3", "length": 16, "strength": { "score": 4, "level": "Very Strong", "feedback": "Excellent password with good character variety" }, "character_sets": { "uppercase": true, "lowercase": true, "numbers": true, "symbols": false }, "entropy": 95.42 }, "message": "Password generated successfully", "timestamp": "2025-09-09T12:00:00Z" }

Multiple Passwords Response

{ "success": true, "data": { "passwords": [ { "password": "Kx7mN9pQw2Yv", "strength": { "score": 4, "level": "Very Strong" } }, { "password": "Zf5bH8nMv3Qp", "strength": { "score": 4, "level": "Very Strong" } } ], "count": 2, "settings": { "length": 12, "character_sets": { "uppercase": true, "lowercase": true, "numbers": true, "symbols": false } } }, "message": "Passwords generated successfully", "timestamp": "2025-09-09T12:00:00Z" }

Error Response

{ "success": false, "error": "Invalid password length. Must be between 4 and 128 characters", "code": "INVALID_LENGTH", "timestamp": "2025-09-09T12:00:00Z" }

💪 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