HTPasswd Generator

Create password credentials for Apache .htaccess and .htpasswd files

User List

No users added yet. Generate an entry and click "Add to List".

Sample .htaccess Configuration

AuthUserFile /path/to/.htpasswd
AuthType Basic
AuthName "Restricted Area"
Require valid-user

Place this in a .htaccess file in the directory you want to protect. Update the AuthUserFile path to match your server configuration.

About HTPasswd

The .htpasswd file is used by Apache HTTP Server to store usernames and passwords for basic authentication. Each line contains a username and encrypted password separated by a colon.

  • MD5 (APR1) - Recommended. Apache-specific MD5 that works on all platforms.
  • SHA1 - SHA1 hash with Base64 encoding. Widely supported.
  • Crypt - Traditional Unix DES-based encryption. Limited to 8 character passwords.
  • Plain - No encryption. Only for testing, never use in production.