EasyConvert / Security & Tokens
HTPASSWD Basic Auth Generator
Generate Nginx and Apache .htpasswd entries with bcrypt or MD5 hashing. Free browser-based tool with no signup required.
About HTPASSWD Basic Auth Generator
Generate Nginx and Apache .htpasswd entries with bcrypt or MD5 hashing.
The tool is designed to process data in the browser unless the interface explicitly states that a network request is required.
How to use this tool
- Enter or select the username, password value you want to work with.
- Review the available settings, then run the generate action.
- Review the .htpasswd entry output and use the copy or download action when the tool provides one.
What you can do with HTPASSWD Basic Auth Generator
- Generate htpasswd line
- Create nginx basic auth password
What this conversion does
Generate valid .htpasswd entries for HTTP Basic Auth using real bcrypt, Apache APR1-MD5, or SHA-1 hashing.
Example input
Username admin with a strong password, bcrypt selected
Example output
admin:$2b$10$… — paste it directly into your .htpasswd file
Practical workflow
- Enter the username and password for the protected area.
- Choose the algorithm: bcrypt (htpasswd -B, Apache 2.4+), APR1-MD5 (htpasswd -m, the most widely compatible), or SHA-1 (legacy).
- Copy the generated line into your .htpasswd file and reference it from Apache or nginx configuration.
Common use cases
- Protect a staging site with Basic Auth without installing the htpasswd utility.
- Add a user to an existing .htpasswd file from any machine.
- Generate nginx auth_basic_user_file entries (APR1 works with stock nginx).
Important notes and limitations
- Hashes are computed with the real algorithms and verified test vectors, so the entries work exactly like output from the htpasswd command.
- APR1-MD5 is the safest compatibility choice for nginx; bcrypt requires Apache 2.4+ or bcrypt-capable crypt support.
- Everything runs locally — passwords are never transmitted or stored.
Continue your workflow
- Bcrypt Hash Generator & Verifier — generate or verify standalone bcrypt hashes.
- Password Generator — create a strong password first.
Frequently asked questions
How do I create a .htpasswd file without the htpasswd command?
Enter a username and password here, pick an algorithm, and copy the generated user:hash line into a file named .htpasswd. Point Apache's AuthUserFile or nginx's auth_basic_user_file at that file.
Which algorithm should I choose for nginx?
APR1-MD5 is supported by stock nginx everywhere. Bcrypt is stronger and works with Apache 2.4+ and systems whose crypt() supports it; SHA-1 exists only for legacy compatibility.
Are the generated hashes real?
Yes. bcrypt entries are produced by the standard bcrypt algorithm and APR1 entries follow Apache's apr_md5_encode exactly (validated against the canonical Apache test vector), so servers accept them directly.