htpasswd Generator

Generate Apache htpasswd files for HTTP Basic Authentication. Supports bcrypt, MD5, and SHA hashes.

Input
Output
Ready — enter input to start

Frequently Asked Questions

What is htpasswd and when should I use it?+
htpasswd is a file format used by Apache HTTPD and compatible servers for HTTP Basic Authentication. It stores username and hashed password pairs for protecting directories or files. Use it for admin panels, development servers, or internal tools where you need simple authentication.
Which hash algorithm should I choose?+
bcrypt is the recommended algorithm for new htpasswd files due to its built-in salt and adaptive cost factor. APR1 offers similar security with Apache-specific implementation. SHA1 should only be used for legacy compatibility, and plain MD5 is considered insecure and should be avoided.
How do I use the generated htpasswd file?+
Copy the generated username:hash pairs to your htpasswd file (commonly .htpasswd or passwords). Configure your web server with AuthType Basic, AuthName for the login prompt, and AuthUserFile pointing to your file. Always serve protected content over HTTPS.
Is HTTP Basic Authentication secure?+
Basic Authentication transmits credentials in Base64 encoding, providing no real security without HTTPS encryption. Always use HTTPS when transmitting credentials. For better security, consider digest authentication or OAuth-based solutions for production applications.
Can I generate multiple users at once?+
Yes. Enter one user per line with the format username||password||type. Each line generates a separate username:hash entry in the output, making it easy to bulk-create credentials for multiple team members.
Is my data sent to a server?+
No. All processing happens locally in your browser. Passwords are hashed using Web Crypto API and bcrypt.js libraries running entirely on your device.
Copied!