.htaccess & .htpasswd Generator
Generate Apache HTTP basic auth config – fast, local and privacy-first.
1. .htaccess configuration
Define what you want to protect and where your credentials file lives.
Shown in the browser login dialog.
Server file system path, not a URL (e.g. /var/www/example.com/.htpasswd).
Just the file name inside this directory, e.g. admin.php.
2. .htpasswd entries
Generate user:hash lines for your .htpasswd file.
{SHA} works on most modern Apache setups and keeps passwords out of plain text.
Place this .htaccess file in the directory (or alongside the file) you want to protect.
Create / update your .htpasswd file with these lines. Store it outside the web root if possible.
All generation runs locally in your browser. No usernames or passwords are sent to the server.