🔐 .htpasswd Generator
Build a ready-to-paste line for Apache's .htpasswd basic-auth files. Computed entirely in your browser — nothing is sent anywhere.
Supported formats: APR1-MD5 and
{SHA} SHA-1 only. Modern Apache's
recommended default is bcrypt (htpasswd -B), which is deliberately slow
and the strongest option available. Bcrypt is not implemented here because a correct, safe pure-JS
implementation is a large undertaking on its own — use the real htpasswd CLI (or your
server's tooling) for bcrypt. Of the two formats this tool supports, APR1-MD5 is the better
choice; {SHA} is a single unsalted SHA-1 pass, kept only for compatibility with
very old setups and should not be used for anything new.
1. Credentials
Cannot contain a colon (
:) — that character separates the username from the hash in the file.
2. .htpasswd line
Paste this line as-is into your .htpasswd file (one user per line).