Apache .htpasswd Generator
Generate Apache .htpasswd password hashes using bcrypt, MD5, SHA1, and Crypt algorithms.
About Apache .htpasswd Generator
Our free online Apache .htpasswd Generator is a powerful tool that creates password hashes for Apache web server authentication. It supports four widely-used hashing algorithms: bcrypt, Apache MD5, SHA1, and Unix Crypt, allowing you to generate secure .htpasswd file entries.
The .htpasswd file is used by Apache to store usernames and hashed passwords for HTTP Basic Authentication. Each line in the file contains a username followed by a colon and the hashed password. This tool generates the complete line ready to be added to your .htpasswd file.
This tool processes your input entirely in the browser using JavaScript, ensuring your credentials never leave your device. Generate htpasswd entries instantly and copy them directly to your .htpasswd file for immediate use.
bcrypt is recommended for maximum security as it is designed to be computationally expensive, making brute-force attacks more difficult. Apache MD5 provides a good balance of security and compatibility with older Apache installations.
Features
Multiple Algorithms
Support bcrypt, Apache MD5, SHA1, and Crypt for different security requirements.
bcrypt Support
Generate bcrypt hashes for maximum security protection against brute-force attacks.
Ready-to-Use
Generate complete htpasswd lines ready to paste directly into your .htpasswd file.
One-Click Copy
Copy the generated htpasswd entry to clipboard with a single click.
Sample Data
Quickly test the tool with sample username and password using the Sample button.
Privacy First
All processing happens in your browser. Your credentials never leave your device.
How to Use
Enter Username
Type the username you want to create an htpasswd entry for.
Enter Password
Type the password that will be hashed and stored in the htpasswd entry.
Select Algorithm
Choose the hashing algorithm: bcrypt (recommended), Apache MD5, SHA1, or Crypt.
Generate and Copy
Click Generate Hash, then copy the resulting username:hash line to your .htpasswd file.
Frequently Asked Questions
What is an .htpasswd file?
An .htpasswd file is a plain text file used by Apache web server to store usernames and hashed passwords for HTTP Basic Authentication. Each line contains a username followed by a colon and the hashed password.
Which algorithm should I use?
bcrypt is recommended for maximum security as it is computationally expensive and resistant to brute-force attacks. Apache MD5 (apr1) is a good alternative for compatibility with older Apache installations. SHA1 and Crypt are legacy options.
What is bcrypt?
bcrypt is a password hashing function designed by Niels Provos and David Mazieres. It incorporates a salt to protect against rainbow table attacks and is computationally expensive, making brute-force attacks more difficult.
How do I use the generated htpasswd entry?
Copy the generated username:hash line and paste it into your .htpasswd file. Each user should be on a separate line. Make sure the .htpasswd file is stored in a location not accessible via the web server.
Is this htpasswd generator free?
Yes, it is completely free to use with no registration, sign-up, or limits. You can use it as many times as you need for personal, educational, or commercial projects.
Does it work offline?
Yes, once the page is loaded, all hash generation happens entirely in your browser using JavaScript. No server communication is needed, so you can use it even without an internet connection after the initial page load.