About Htpasswd Generator
An .htpasswd file from this htpasswd generator puts a password prompt in front of a staging site, an admin folder or files you share with a client, using the basic authentication built into Apache and Nginx. Enter one user, or several as user:password on separate lines, and use the password generator when you need a new password. Every line comes out hashed and ready to paste into .htpasswd.
Choose APR1-MD5, the lines starting with $apr1$, which is Apache's default and works with Nginx too, or SHA-1 ({SHA}) for older setups. APR1 is salted, so it's the better choice. The output includes Apache and Nginx configuration snippets. Keep .htpasswd outside the public web folder, and serve the site over HTTPS, because basic authentication only encodes the password on its way to the server. Hashing happens in your browser, so passwords never leave your device. An HTTPS site needs a valid certificate, and the SSL Certificate Checker confirms yours is trusted.
How to use Htpasswd Generator
- 1Enter the users
Type one user or paste several as user:password, one per line, or generate a password.
- 2Pick the format
APR1-MD5 for Apache and Nginx, or SHA-1 if an older system needs it.
- 3Save the .htpasswd file
Paste the lines into a .htpasswd file stored outside your web root.
- 4Add the server config
Copy the Apache or Nginx snippet, set the path to your file and reload the server.
Why use Cubfile for this
- Many users at once
Paste a list of user:password pairs and every line is hashed.
- Password generator
Make a random password for a user without leaving the page.
- Two hash formats
Salted APR1-MD5, Apache's default, and SHA-1 for older systems.
- Private hashing
Passwords are hashed in your browser and never sent anywhere.