1001Ferramentas
🔎 Security

.htpasswd Auditor

Paste a .htpasswd file and see each user's hash scheme, the bcrypt cost, malformed lines and duplicate users. It also tests a password against a line.

Everything runs in your browser — no line is uploaded anywhere. Even so, prefer testing with a copy rather than a production file.

Audit
Test a password

What is actually inside your .htpasswd

A basic-auth file tends to accumulate layers: a line created in 2014 with the algorithm of the day, another someone pasted from an online generator, a third in plain text that went in "just for testing" and stayed. Since they all work, nobody reviews them. Paste the contents here and the page tells you, line by line, which hash scheme is in use and what it is worth today.

Identification is by the shape of the hash: $2y$ is bcrypt and comes with its cost on display, $apr1$ is Apache's salted MD5, $5$ and $6$ are SHA-crypt, {SHA} is unsalted SHA-1, thirteen loose characters are the DES crypt of the 1970s, and anything matching none of those is a password stored in the clear. Alongside come the warnings that matter: duplicate users, bcrypt cost below 10, schemes with no salt, and malformed lines.

The second part of the page tests a password against a user's line — useful when a login fails and you need to know whether the problem is the password or the server configuration. It works for bcrypt, APR1, SHA-crypt, SHA-1 and plain text. DES crypt is identified but not checked: it depends on the system crypt, and it is precisely the scheme nobody should still be running. Nothing is sent to any server, but prefer working from a copy rather than the production file.

Frequently asked questions

Why is a duplicate user a problem?
Because the server uses the first occurrence and ignores the rest, logging nothing. If someone changed a password by appending a new line at the end instead of editing the existing one, the new password simply does not apply — and the symptom is a user swearing they changed their password while still getting in with the old one.
What bcrypt cost should I look for?
Ten is the reasonable minimum and has been the htpasswd default since 2.4.4; twelve is common today for sensitive data. Cost 5 shows up often because it was the default in older versions of the tool, and it makes brute forcing roughly thirty times faster than cost 10.
Does Apache accept all these formats?
No. It understands bcrypt, APR1, SHA-1 in the {SHA} format, DES crypt and plain text. The $5$ and $6$ formats come from glibc's crypt: they work with nginx on Linux, but Apache rejects them. It is an incompatibility that usually surfaces only after a server migration.

Related Tools