Skip to content
T
Tools.Town
Free Online Tools for Everyone
Developer Corner

HTPasswd Generator

Introducing the HTPasswd Generator — Basic Auth in Seconds

Generate correct .htpasswd entries for Apache and Nginx HTTP Basic Auth using APR1 or SHA-1, with a random salt. Hashed entirely in your browser, nothing uploaded.

Tools.Town Team 24 June 2026 2 min read

Need to put a password prompt in front of a staging site or admin folder without building a login system? The new HTPasswd Generator creates a ready-to-use .htpasswd entry for HTTP Basic Auth in seconds.

What it does

  • APR1, SHA-1, and plain formats — APR1 (Apache MD5) is the recommended, portable default.
  • Random salt generated in your browser for each APR1 entry.
  • Byte-for-byte correct output that matches the real htpasswd binary.
  • Copy or download the line straight into your .htpasswd file.
  • Works for Apache and Nginx — the same file format serves both.

Why it matters

HTTP Basic Auth is the quickest way to gate a directory with zero application code. The catch is that the hash format has to be exactly right, or the server silently rejects every login. This tool produces correct entries so protection works on the first try.

A note on security

Always serve protected directories over HTTPS, keep the .htpasswd file outside your web root, and use a strong password — generate one with the Password Generator. For the strongest hashing, create bcrypt entries server-side with htpasswd -B.

Learn more

Want to understand the file format, the hashing options, and how to wire it into your server config? Our guide to .htpasswd and HTTP Basic Auth walks through everything, then generate your entry with the HTPasswd Generator.

Frequently Asked Questions

Which algorithm does it use?
APR1 (Apache's portable MD5, the htpasswd -m default) is recommended, with SHA-1 ({SHA}) and plain text also available. For bcrypt, generate the entry server-side with htpasswd -B.
Is my password uploaded?
No. The username, password, salt, and hashing all run locally in your browser. Nothing is sent to a server, logged, or stored.

Explore more on Tools.Town Blog

Finance guides, tool launches, and engineering stories — updated weekly.

All Posts