htpasswd Generator
Generate .htpasswd entries with real bcrypt or SHA-1 hashing, entirely in your browser — your password is never sent anywhere. Free.
Generate an .htpasswd entry
Enter a username and password. Hashing happens in your browser — nothing is sent anywhere.
What this htpasswd generator does
Common use cases
- 1Adding HTTP Basic Auth
- 2Password-protecting a directory
- 3Securing a staging site
- 4Restricting admin areas
- 5Rotating a basic-auth password
- 6Setting up .htaccess auth
Related tools
About .htpasswd
.htpasswd stores usernames and hashed passwords for HTTP Basic Authentication in Apache (and Nginx via auth_basic_user_file). Each line is username:hash.
This generator hashes with bcrypt — a strong, salted algorithm Apache supports — or SHA-1 for legacy systems. Crucially, the hashing runs entirely in your browser, so your plaintext password is never transmitted. Add the generated line to your .htpasswd file, then reference it from your server config with AuthType Basic.
More Free Tools Where This Came From
This utility is one of dozens of free, no-login tools for DNS, email, SEO and developers — all instant and private.
HostCloud.in · Pune, India · Serving 34,987+ Websites Since 2020
Got Questions? We Have Answers.
How is the password hashed?
With bcrypt (a strong, salted algorithm Apache supports) or SHA-1 for legacy setups. The hashing runs entirely in your browser using bcryptjs and Web Crypto.
Is my password sent to a server?
No. It is hashed locally in your browser and never transmitted, so it is safe to use for real credentials.
Which algorithm should I choose?
bcrypt — it is salted and secure. Use SHA-1 only for legacy compatibility; it is unsalted and weak.
How do I use the output?
Add the username:hash line to your .htpasswd file and reference it with AuthType Basic in Apache (or auth_basic_user_file in Nginx).
