Free Htpasswd Generator
Generate Apache .htpasswd password entries for HTTP Basic Authentication. Supports SHA-1 ({SHA} prefix) algorithm computed in the browser via Web Crypto API. No data is uploaded.
Note: MD5-APR1 (the default htpasswd algorithm) requires server-side computation and cannot be generated in the browser. SHA-1 is widely supported and works with Apache 2.x and Nginx.
About Htpasswd Generator
The Apache htpasswd utility creates and manages a flat-text password file used for HTTP Basic Authentication. Each line contains a username and the hashed password in the format username:hash.
This browser-based generator creates SHA-1 ({SHA}) entries using the Web Crypto API. The SHA-1 format is supported by Apache httpd 2.x, Nginx, and many other web servers. The output is a Base64-encoded SHA-1 hash of the password, prefixed with {SHA}.
How to Use the .htpasswd File
Generate Entry
Enter your username and password and click "Generate". Copy the output line.
Create File
Create a file named .htpasswd in your server directory (outside the web root for security).
Add Entry
Paste the generated line into .htpasswd. Add multiple lines for multiple users.
Configure Server
Point your Apache .htaccess or Nginx config to the .htpasswd file path.
Frequently Asked Questions
MD5-APR1 (the $apr1$ format) uses a specific salted iterative hash scheme that requires server-side computation. Browser cryptography APIs do not expose this algorithm. SHA-1 htpasswd entries are supported by all major web servers and are a good browser-compatible alternative.
SHA-1 htpasswd entries provide basic protection for HTTP authentication. The password is hashed rather than stored in plain text. For high-security environments, use bcrypt-based htpasswd (generated server-side with htpasswd -B) combined with HTTPS.