What is the htpasswd Generator?
Protect an admin area, staging site or private folder with a username and password prompt (HTTP Basic Authentication). Enter a username and password to get a secure .htpasswd line (bcrypt, recommended) plus the .htaccess code to paste into the folder you want to protect.
Works on Apache and LiteSpeed servers such as Hostinger, cPanel and most shared hosting.
How to use the htpasswd Generator
- Enter a username and password and press Generate.
- Create a file named
.htpasswd(ideally outside public_html) and paste the line. - Put the .htaccess code in the folder you want to protect and update the full path.
Tips
- Always use HTTPS with Basic Auth so passwords are encrypted in transit.
- Use bcrypt – SHA-1 is only for very old servers.
- Find the full server path in your hosting file manager (e.g. /home/u123456/.htpasswd).
This htpasswd Generator is 100% free, needs no signup and runs privately in your browser – on phone, tablet or computer.
Last updated: · By NodifyTech