We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
If this tool helped you, you can buy us a coffee ☕
Generate user authentication password files for Apache and other servers. Supports multiple encryption algorithms including BCrypt, MD5, and SHA-1.
Enter username and password to generate

Random Number Generator
Generate random integers or decimals within a specified range, featuring duplicate removal, sorting, and formatted output.

Caesar Cipher Encoder & Decoder
Free online Caesar cipher encryption and decryption tool. Supports custom alphabets and shift offsets. Ideal for cryptography learning and fun.

Vigenère Cipher Encoder & Decoder
Encrypt or decrypt text using the classic polyalphabetic substitution algorithm. Ideal for cryptography learning and testing.

Random Password Generator
Customize character types and length to generate strong random passwords and secure your accounts.

Random Number Generator
Generate random integers or decimals within a specified range, featuring duplicate removal, sorting, and formatted output.

Caesar Cipher Encoder & Decoder
Free online Caesar cipher encryption and decryption tool. Supports custom alphabets and shift offsets. Ideal for cryptography learning and fun.

Vigenère Cipher Encoder & Decoder
Encrypt or decrypt text using the classic polyalphabetic substitution algorithm. Ideal for cryptography learning and testing.

Random Password Generator
Customize character types and length to generate strong random passwords and secure your accounts.

CRC16 Checksum Calculator
Online CRC16 checksum tool to calculate 16-bit cyclic redundancy check values for text, Hex, and Base64 data to verify data integrity.
When you need to set up access permissions for a website directory but struggle with the complex and error-prone format of manual password records, this tool can quickly generate standard .htpasswd file entries. The .htpasswd file is a text file used by the Apache HTTP Server to store usernames and encrypted passwords for HTTP Basic Authentication. Based on your input username, password, and selected encryption algorithm (such as BCrypt, MD5 APR1, or SHA-1), this tool generates a compliant single-line record in real time. You simply need to copy it into the .htpasswd file on your server.
Q: How do I add the generated content to my .htpasswd file?
A: Simply append the generated "username:encrypted_password" string as a new line to the .htpasswd file on your server. Each user should have their own line.
Q: What encryption methods does htpasswd support?
A: It supports BCrypt (most secure), MD5 APR1 (common for Apache), SHA-1 (compatible with legacy systems), and Plain Text (not recommended). BCrypt is currently the best choice against brute-force attacks.
Do not use the "Plain Text" algorithm in a production environment, as it does not encrypt the password, leaving it fully visible. The generated .htpasswd file should be placed outside your web directory and correctly referenced using Apache's AuthUserFile directive. Please note that this tool generates only one record at a time. To manage multiple users, you need to generate them one by one and merge them into the same file.
For production environments, it is strongly recommended to use the BCrypt algorithm. It provides the strongest password storage security through an adaptive hash function and salt. A typical .htpasswd file content example is as follows, where each line represents a user:admin:$apr1$r5... (MD5 APR1 Hash)
user2:$2y$10$... (BCrypt Hash)
legacyuser:{SHA}... (SHA-1 Hash)
When configuring Apache, ensure that the AuthUserFile path in your .htaccess file points to the correct absolute path of the .htpasswd file, and set appropriate file permissions (e.g., 644).