Htpasswd Generator — Free Online .htpasswd File Creator

Generate .htpasswd entries for Apache and nginx HTTP Basic Authentication.

100% Client-Side — Your data never leaves your browser

Frequently Asked Questions

Creating .htpasswd Files for HTTP Basic Authentication

HTTP Basic Authentication protects web resources with a username and password, stored in an .htpasswd file. Apache httpd and nginx both support this file format for simple password protection of directories, admin panels, and staging environments.

The .htpasswd format is simple: one entry per line as username:hash. Multiple hash formats are supported: bcrypt ($2y$...) is the most secure and recommended for new setups. SHA-1 base64 ({SHA}...) is widely supported but cryptographically weak. Plain text is never appropriate. APR MD5 ($apr1$...) is legacy.

For production use, generate bcrypt entries using the Bcrypt Generator tool (which uses the bcryptjs library) and prepend the username manually. For quick SHA-1 entries compatible with legacy nginx and Apache configurations, this tool generates them directly.

Related Tools