htpasswd Generator

Generate htpasswd lines for nginx and Apache basic auth with apr1, bcrypt or SHA-1, and verify a password against an existing line.

Generate a line

Verify an existing line

Paste a line from your htpasswd file and check a password against it. Everything is computed locally.

Append the generated line to the file referenced by auth_basic_user_file, then set auth_basic and auth_basic_user_file on the server or location block. One file can mix algorithms.

Each extra bcrypt round doubles the work: around 60ms at 10 rounds and 240ms at 12. Higher rounds cost an attacker more but also slow every login.

The password is only used in your browser and never uploaded — but the hash itself is a credential, so keep it private.

Comments

Sign in to join the discussion

No comments yet — be the first to say something