Htpasswd Generator
Generate a real .htpasswd entry - bcrypt or Apache's own APR1-MD5 format - for Apache/Nginx HTTP Basic Authentication.
Enter a username and password and choose a format - this tool generates a real .htpasswd entry ready to paste into your password file.
Computed entirely in your browser - never write this file directly to a live server from a browser tool; copy the line into your own .htpasswd file through your normal deployment process.
Never write this file directly to a live server from this tool - copy the generated line into your own .htpasswd file through your normal deployment process.
What Is a .htpasswd File?
A .htpasswd file stores username:hash pairs used by Apache's (or Nginx's) HTTP Basic Authentication to protect a directory - each line is one user, verified against the hash when they log in.
Why Use This Tool?
Apache's own htpasswd command-line tool isn't always available (e.g. on a shared host or when working from a different OS) - this tool generates a real, correctly-formatted entry without needing that command installed.
How to Use It
- Enter a username and password.
- Choose a format: bcrypt (modern, recommended) or APR1-MD5 (Apache's own salted MD5 variant, for compatibility with older Apache setups).
- Copy the generated
username:hashline into your .htpasswd file.
Limitations
This supports bcrypt and APR1-MD5 - the legacy Unix crypt() format (very old, weak, rarely required today) isn't generated here. APR1-MD5 is Apache's own specific salted-MD5 variant, distinct from and not to be confused with plain, unsalted MD5 hashing.