All tools

htpasswd Generator

Hash

Generate Apache .htpasswd entries with bcrypt, SHA-1, MD5, or plain password hashing

Generate a line for an Apache `.htpasswd` file from a username and password, with a choice of hash format to match how your server is configured to read the file. bcrypt output uses a real bcrypt implementation, so it is genuinely correct and will authenticate as expected; it's the recommended option for new entries. SHA-1 output (the `{SHA}` prefix) also uses a real SHA-1 implementation, so that option is genuinely correct too. Plain text output is included as well, but that's meant for local testing only, never for anything resembling production. It's worth checking which specific hash format your Apache or nginx config actually expects before generating a batch of entries, since picking the wrong one will produce a line that looks correct but won't authenticate against your server.

htpasswdapachepasswordsha1md5auth

How to use htpasswd Generator

  • 1.Enter a username and password to generate a ready-to-paste `.htpasswd` line for Apache Basic Auth using bcrypt, SHA-1, or MD5 (Apache's variant).
  • 2.Use plain text mode only for local testing or when your server config explicitly expects unhashed entries — never for production.
  • 3.Generate multiple entries one at a time and append each line to your `.htpasswd` file to manage several users.

Frequently asked questions

Which hash type should I use?
bcrypt is the strongest and recommended option, and Apache's MD5 variant (apr1) is a traditional, widely compatible default. SHA-1 is also supported. All three formats generate real, correctly-derived hashes of your password.
Is my password sent to a server?
No, hashing happens locally in your browser — but treat any password you type into any web tool as no longer fully secret, and rotate it if it was a real production credential.
Why does Apache reject my generated line?
Double-check you copied the exact `username:hash` format with no extra whitespace, and that your Apache config's `AuthType` matches the hash scheme you generated.
Does this work for Nginx's basic auth too?
Nginx uses the same crypt-based htpasswd file format for `auth_basic_user_file`, so entries generated here are generally compatible.

Use via API, SDK, or MCP

Installnpm install @utilix-tech/sdk
Usageimport { hashing } from '@utilix-tech/sdk'
const entry = hashing.createEntry('alice', 'password', 'bcrypt')
console.log(entry.line) // alice:$2b$10$...

Runs locally · no API key · no rate limits · Node.js SDK docs →