htpasswd generator

Generates a line for an Apache .htpasswd file, used with AuthUserFile in .htaccess for password-protecting a directory. bcrypt is recommended for Apache 2.4+; apr1 and SHA1 exist for older servers or specific compatibility needs.

What is htpasswd generator?

Password-protecting a directory with Apache's Basic Auth requires a .htpasswd file containing a username and a hashed (never plain-text) password.

How to use it

Enter a username and password and pick a hash format — bcrypt is recommended for modern Apache, with apr1 and SHA1 available for compatibility with older setups.

Example

admin:$2y$10$PnUv5YBPZznv1nwk6tv9S.pAv8NrWP18TUbWXFrsNShsRP7OnopD6