.htpasswd Generator
Create Apache .htpasswd credential lines with bcrypt, APR1-MD5, SHA-1 or crypt. All hashing happens in your browser — nothing is uploaded.
Build an Apache .htpasswd credential line right in your browser — your password is hashed locally and never leaves this page.
Everything is computed locally in your browser. No username or password is ever sent to a server.
Not sure which to pick? Use APR1-MD5 — it is the most portable and the recommended choice for Apache .htpasswd files.
About .htpasswd Generator
The .htpasswd generator creates Apache credential lines for HTTP basic authentication — the username:hash pairs that protect directories behind a login prompt. Enter a username and password (or generate a strong random one) and choose a hash algorithm: bcrypt, APR1-MD5, SHA-1 or crypt.
APR1-MD5 is the recommended, most portable choice for .htpasswd files — it works on every Apache build. Bcrypt is the strongest where supported, while SHA-1 and crypt exist mainly for legacy compatibility. The tool labels each algorithm with guidance so you can pick confidently.
Crucially for a password tool, all hashing happens locally in your browser: no username or password is ever sent to a server. Copy the generated line into an existing file or download a ready .htpasswd, then reference it from your Apache configuration or .htaccess AuthUserFile directive.
How to use .htpasswd Generator
- Enter a username (no spaces or colons) and a password, or click the button to generate a strong random password.
- Pick a hash algorithm — APR1-MD5 is the recommended default; bcrypt, SHA-1 and crypt are also available.
- Click "Generate credential line" and wait for the hashing to finish.
- Copy the username:hash line or download it as a .htpasswd file.
- Reference the file from your Apache config or .htaccess with AuthUserFile to enable basic auth.