Skip to content
ToolsLeb ToolsLeb

.htpasswd Generator

Generate a username:hash line for Apache .htpasswd basic authentication files.

Share on Social Media:

Enter a username and password to generate a ready-to-use line for an Apache .htpasswd file, in the format username:hash. The password is hashed with Bcrypt, which is supported by modern Apache and Nginx basic-auth configurations.

Frequently Asked Questions

Copy the full username:hash line into your server's .htpasswd file (one user per line), and make sure your web server is configured with AuthType Basic and the correct AuthUserFile path.

Bcrypt ($2y$) hashes are supported by Apache 2.4.4+ and Nginx. If you are using a very old server that only supports the legacy crypt() or MD5-based htpasswd formats, check its documentation first.

Yes — generate a line for each user separately and add them all to the same file, one username:hash pair per line.

It provides simple access control but transmits credentials with each request (base64-encoded, not encrypted) — always use it over HTTPS, and consider it a basic access gate rather than a full authentication system for sensitive applications.