Generate a .htpasswd password for Apache

Create your hashes online

Create your passwords with this .htpasswd generator for Apache and nginx. Just enter your password and the tool will encrypt it ready for inclusion in .htpasswd . You can also override the salt generated by this tool by providing it manually.

htpasswd Apache converter
  1. Choose from Google Drive
  2. (by clicking you confirm that you understand and agree to our terms)
  3. Your file is currently uploading. Uploading
    Progress: 

    Total file size: - MB
    Upload rate: - KB/s
    Time left: --:--:--

Once you have hashed your password, you need to add your username and save it in a file called .htpasswd . Each line is for a user following this specification: username:password_hash. For example: testuser:$apr1$kan2dc94$Xfi6nlAR7C.9LfQLTjDLi0

You can find more information about the .htpasswd file usage looking at the Apache authentication or the nginx authentication

Advertisement

The input string encoding is expected to be in UTF-8. Different encoding will result in different hash values. Unicode is considered best practices.