How to use
- Enter a username and password.
- Click "Generate".
- Paste the result directly into your .htpasswd file.
🎯 Use Cases
- Set up Apache Basic auth — create accounts for a directory protected with .htaccess
- Restrict access to an internal test server — add simple username/password authentication
- Generate an Nginx auth_basic_user_file — Nginx supports the same hash format
Example
Input
Username: admin Password: s3cret42 (salt: Xy7bQ2mZ)
Output
admin:$apr1$Xy7bQ2mZ$Po1ThYwGdFdSdS54NPlWa/
This is the APR1-MD5 hash of the password s3cret42 with salt Xy7bQ2mZ, matching the output of openssl passwd -apr1 exactly. The live tool uses a random salt each run, so its hash will differ.
FAQ
- What format does this tool generate?
- It generates the same APR1-MD5 format (
$apr1$...) as Apache'shtpasswd -moption. Modern Apache also supports bcrypt (-B), but this tool only supports APR1-MD5. - Is the password sent to a server?
- No. It's computed in your browser with a self-implemented MD5 that has been verified against real openssl output.
- Why does the result change every time I generate it?
- Because a new random salt (8 characters) is generated each time. The hash differs for the same password when the salt differs — this is expected behavior.
🗝️ Learn more: How to Create an Apache .htpasswd File for Basic Auth
Generate an APR1-MD5 hashed .htpasswd file
More Security Tools
🔑
Password Generator
Generate strong random passwords
#️⃣
Hash Generator
Generate MD5, SHA-1, SHA-256 hashes
📱
QR Code Generator
Turn text/URLs into a QR code
🔍
SSL Certificate Viewer
Check issuer, validity & SANs
📜
CSR Viewer
Check CSR subject & public key info
♻️
SSL Certificate Converter
Convert PEM ↔ DER (HEX)
🤝
Cert/Key Pair Checker
Verify a certificate matches its private key
🩺
SSL Checker
Check HTTPS connectivity & trust
🪄
Self-Signed Certificate Generator
Generate a self-signed SSL cert & key
🔐
Base64 Encode/Decode
Convert text ↔ Base64
🔑
HTTP Auth Header Generator
Build Basic/Bearer Authorization headers
🪪
JWT Decoder
Inspect JWT header/payload, verify HS256
🎫
Random Token Generator
Generate Hex/Base64/UUID tokens
🔒
Jasypt Encrypt/Decrypt
Encrypt/decrypt Spring Boot ENC(...) values