htpasswd Generator

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.

Username
Password
Cost (rounds)

Enter username and password to generate a bcrypt .htpasswd line locally for Apache/Nginx Basic Auth config files.

Quick start

  1. Enter credentials

    Username and password.

  2. Tune cost

    Rounds 4–14; higher is slower and stronger.

  3. Copy line

    Append to your .htpasswd file.

vs basic-auth generator

This outputs config file lines; basic-auth-generator outputs Authorization headers.

Typical Workflow

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.

Examples

Example

Input

admin + password

Output

admin:$2a$10$…

FAQ

Password uploaded?

No; bcrypt runs locally.

APR1 support?

Bcrypt ($2a$) for now; supported on most modern servers.

Why bcrypt instead of MD5?

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.