Home About Contact
Categories
Text Tools 51 Calculators 42 Converters 31 Developer Tools 64 SEO Tools 29 Image Tools 54 Security Tools 13 Social Media 28 Document Tools 54 Utility Tools 67 Health & Fitness 52 Finance Tools 78 Education & Study 84 Audio & Video 29 Printables & Templates 50 Games & Puzzles 30

htpasswd Generator (Password Protect a Folder)

Generate .htpasswd entries with bcrypt or SHA-1 and the matching .htaccess code to password-protect a website folder on Apache or LiteSpeed (Hostinger, cPanel).

Security Tools Free Private

.htpasswd line

.htaccess code

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

  1. Enter a username and password and press Generate.
  2. Create a file named .htpasswd (ideally outside public_html) and paste the line.
  3. 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