.htpasswd Generator

Create a .htpasswd line for Apache or Nginx Basic Authentication, hashed with bcrypt.

Result appears here…
Advertisement

What this tool does

HTTP Basic Authentication protects a directory with a username and password. The credentials live in a .htpasswd file as username:hashedPassword. This tool generates that line using a bcrypt hash, which Apache (2.4+) and Nginx both support.

How to use it

  1. Enter a username and password and click Generate.
  2. Add the line to your .htpasswd file (one user per line).
  3. Point your server config at that file (e.g. AuthUserFile in Apache, auth_basic_user_file in Nginx).
Security: Basic Auth sends credentials on every request — always serve it over HTTPS. Use a strong, unique password. For production, generating hashes on your own server is preferable to any online tool.
Advertisement