Htpasswd Password Generator
Create a ready-to-paste line for your .htpasswd file. The hash is computed locally, so the password stays on your machine and is not stored anywhere.
- Runs in your browser
- Free, no sign-up
What this tool gives you
APR1-MD5
The portable Apache MD5 variant with a random 8-character salt, accepted by Apache and Nginx.
SHA-1 option
The {SHA} format for systems that require it.
Zero transmission
The password is hashed in JavaScript and never leaves the browser.
Frequently asked questions
Where do I put the generated line?
Append it to your .htpasswd file, one user per line, then reference the file with AuthUserFile (Apache) or auth_basic_user_file (Nginx).
Why does the hash change every time?
APR1 includes a random salt, so the same password produces a different hash on each run. All of them are valid; the salt is stored inside the hash.
Is APR1-MD5 secure enough?
It is iterated 1000 times and salted, which is far better than plain MD5, but bcrypt is stronger. Use htpasswd -B on the server if your Apache is 2.4 or newer.
Does Nginx support these hashes?
Yes, auth_basic_user_file accepts APR1 and {SHA} entries. Plain crypt() entries also work, but they are limited to eight password characters.