Setting up HTTP basic auth means generating a properly hashed line for your .htpasswd file — and getting the hash format wrong means a login that silently never works. This tool implements the real algorithms Apache itself uses.
What Is the htpasswd Generator?
The htpasswd Generator produces a ready-to-use .htpasswd line using Apache’s own apr1-MD5 crypt format (matching htpasswd -nm byte for byte) or the legacy SHA-1 {SHA} format some Nginx configurations still expect.
How to Use It
- Open the tool at /tools/htpasswd-generator.
- Enter a username and password.
- Choose apr1-MD5 (recommended default) or SHA-1.
- Copy the generated line straight into your
.htpasswdfile.
Key Features
- Real, correct implementations — a hand-rolled MD5 function powers the apr1 crypt algorithm exactly as Apache implements it; SHA-1 uses the browser’s native Web Crypto API.
- No fake bcrypt output — rather than generating a bcrypt-shaped string that wouldn’t actually verify, this tool sticks to formats it implements completely.
- Fresh random salt every time for apr1, matching real htpasswd behavior.
- Fully client-side — your password is never transmitted or logged.
When to Use This Tool
- Setting up HTTP basic auth on Apache or Nginx without having the
htpasswdCLI tool installed. - Generating auth lines for a CI/CD pipeline or a config-as-code setup.
- Understanding how Apache’s apr1 hash format actually works.
Try It Now
Open htpasswd Generator directly, or press ⌘K and type the tool name from anywhere on the site.
Part of the DevOps Tools collection on WebdevToolbox — free, browser-based developer tools with no login required.