Free .htpasswd Generator

Generate secure .htpasswd entries for Apache password protection. Supports APR1-MD5, bcrypt, and SHA-1 hashing. No data sent to any server.

Why Use Our .htpasswd Generator

100% Client-Side

Your username and password never leave your browser. All hashing is done locally in JavaScript. Zero data sent to any server.

Multiple Algorithms

Supports APR1-MD5 (Apache default), bcrypt (most secure), and SHA-1 (legacy). Choose the right one for your server.

Easy Setup

Generates both the .htpasswd entry and a ready-to-use .htaccess example. Just copy, paste, and protect your directory.

Multiple Users

Generate entries for multiple users and combine them on separate lines in your .htpasswd file for multi-user access.

Frequently Asked Questions

What is .htpasswd?

.htpasswd is a file used by Apache web server to store usernames and encrypted passwords for basic HTTP authentication. It is used together with .htaccess to password-protect directories on your website.

Which algorithm should I use?

APR1-MD5 is the most widely supported and recommended for most Apache servers. bcrypt is more secure but requires Apache 2.4+. SHA-1 is legacy and less secure — only use it if your server doesn't support the others.

How do I password-protect a directory?

1) Generate a .htpasswd entry above. 2) Create a file named .htpasswd above your web root and paste the entry. 3) Create or edit .htaccess in the directory you want to protect with the example code. 4) Update the AuthUserFile path to your actual server path.

Is my password secure?

Yes! This tool runs entirely in your browser. Your username and password are never sent to any server. The hashing is done locally using JavaScript implementations of the same algorithms Apache uses.

Can I add multiple users?

Yes. Generate an entry for each user, then add each one on a separate line in your .htpasswd file. For example:
admin:$apr1$...
user2:$apr1$...