toolbin_

Generate .htpasswd File with Bcrypt (Apache/Nginx)

Generate an .htpasswd line (bcrypt) for Apache/Nginx auth, in your browser.

bcrypt hash ($2y$) compatible with Apache htpasswd and Nginx. 100% local.

🔒 100% client-side — no data sent

Generate a bcrypt-hashed .htpasswd line to protect a directory with HTTP Basic authentication on Apache or Nginx. Hashing happens 100% in your browser: your password is never sent over the internet.

What is it for?

  • Password-protect an admin or staging area
  • Create a credential for Basic auth on an Nginx reverse proxy
  • Add a user to an existing .htpasswd file
  • Generate a bcrypt hash without installing the htpasswd utilities locally

FAQ

How do I create a .htpasswd file?

Enter a username and password, then copy the generated line (in user:hash format) into a file named .htpasswd. Reference that file in your Apache or Nginx configuration to enable authentication.

Why use bcrypt for .htpasswd?

Bcrypt is a slow, salted hashing algorithm designed to resist brute-force attacks. It is far more secure than the older MD5 or crypt formats and is supported by both Apache (2.4+) and Nginx.

Does Nginx support bcrypt passwords in .htpasswd?

Yes, Nginx accepts bcrypt hashes (prefix $2y$ or $2a$) in the file referenced by the auth_basic_user_file directive. It is the recommended format for Basic authentication on Nginx.