Free tool

.htpasswd generator.

Generate an htpasswd line for HTTP basic authentication — username plus the APR1/MD5 hash Apache writes with htpasswd -m. Everything runs in your browser; your password never leaves the device.

In short

A .htpasswd file stores a username and a password hash for HTTP basic authentication (e.g. Apache/Nginx). The common format is APR1/MD5: user:$apr1$SALT$HASH. Forge12's generator creates this line 100% in the browser with a random salt — the password is never transmitted or stored.

.htpasswd line
Enter username & password …

APR1/MD5 (Apache htpasswd -m) · random salt · client-side

What is a .htpasswd file for?

With a .htpasswd file you protect directories or whole sites via HTTP basic authentication — the browser asks for a username and password before showing content. Handy for staging environments, internal tools or quick access protection.

The file holds one user and password hash per line. This tool creates the APR1/MD5 format that Apache and many panels use by default. Add the line to your .htpasswd and reference it from .htaccess (AuthType Basic).

FAQ

Frequently asked questions

01Is my password transmitted?

No. The hash is computed entirely in your browser (client-side). Neither the password nor the hash is sent to a server or stored.

02Which hash format is generated?

APR1/MD5 — the portable Apache format ($apr1$…) that htpasswd -m writes. It works with Apache, Nginx and most web panels. Each generation uses a random salt.

03Is APR1/MD5 secure enough?

For basic-auth access protection APR1 is common and widely supported. For higher requirements bcrypt ($2y$) is considered more modern — you create that with htpasswd -B on the server. Always use a strong, unique password and HTTPS.

04How do I use the line?

Copy the generated line into your .htpasswd file (one line per user). In .htaccess you reference it with AuthType Basic, AuthUserFile /path/.htpasswd and Require valid-user.

05Can I create multiple users?

Yes — generate a line for each user and add them one below the other in the same .htpasswd file.