Quick start
-
Enter credentials
Username and password.
-
Tune cost
Rounds 4–14; higher is slower and stronger.
-
Copy line
Append to your .htpasswd file.
Enter username and password to generate a bcrypt .htpasswd line locally for Apache/Nginx Basic Auth config files.
Privacy: processed locally, never uploaded.
↓ Paste in the input area below to see results instantly
Generate Apache .htpasswd lines (bcrypt). Credentials are hashed locally—never uploaded.
Enter username and password to generate a bcrypt .htpasswd line locally for Apache/Nginx Basic Auth config files.
Enter credentials
Username and password.
Tune cost
Rounds 4–14; higher is slower and stronger.
Copy line
Append to your .htpasswd file.
This outputs config file lines; basic-auth-generator outputs Authorization headers.
When protecting specific website directories, simply enter a username and password, then click generate. The tool computes the bcrypt hash locally in your browser without sending data to servers. Copy the generated .htpasswd line into your Apache/Nginx configuration file. No additional software installation required.
For temporary testing environments, use this tool instead of online generators. Developers can quickly create multiple test accounts when setting up demo sites locally. All computations happen client-side, eliminating password exposure risks. The generated hashes are compatible with major web servers.
Input
admin + password
Output
admin:$2a$10$…
No; bcrypt runs locally.
Bcrypt ($2a$) for now; supported on most modern servers.
Fast hashes like MD5 are vulnerable to brute-force attacks. Bcrypt is specifically designed for password storage with built-in salting and adjustable computational cost, making cracking exponentially more difficult even if hashes are compromised.