htpasswd Generator
Generate .htpasswd entries for Apache and Nginx HTTP Basic Authentication. Runs entirely in your browser.
Append this line to your .htpasswd file. Each line = one user.
How to Use .htpasswd
Apache
# In your .htaccess or VirtualHost: AuthType Basic AuthName "Restricted Area" AuthUserFile /path/to/.htpasswd Require valid-user
Nginx
location /protected/ {
auth_basic "Restricted";
auth_basic_user_file /path/to/.htpasswd;
}
Security: Store .htpasswd outside your web root. SHA1 is the most portable format across Apache and Nginx. For maximum security, use bcrypt (requires Apache 2.4+ with apr1 or 2y algorithms).