Skip to content

.htpasswd Generator

Embed

Paste this where you want .htpasswd Generator on your site. Adjust the height to fit.

<iframe src="https://www.browserutils.dev/embed/htpasswd-generator/" width="100%" height="500" frameborder="0" loading="lazy" title=".htpasswd Generator"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://www.browserutils.dev/tools/htpasswd-generator/">.htpasswd Generator</a> by BrowserUtils</p>

Generate .htpasswd entries for Apache basic auth.Runs in this tab.

Next step

About .htpasswd Generator

Free online .htpasswd generator. Create Apache basic authentication password entries with SHA-256 or SHA-1 hashing. It runs in your browser. Nothing is sent to a server.

Questions

What is a .htpasswd file?
A .htpasswd file stores usernames and hashed passwords for Apache HTTP Server basic authentication. Each line contains a username and password hash separated by a colon. The file is referenced by the AuthUserFile directive in your Apache configuration.
Which hashing algorithm should I use for .htpasswd?
SHA-256 is recommended for better security. SHA-1 is supported for compatibility with older systems. Avoid plaintext or MD5-based schemes as they are considered insecure. For production use, bcrypt (via the htpasswd command-line tool) is the strongest option.
Is the .htpasswd generator safe to use for creating real passwords?
The hashing runs entirely in your browser and passwords are never sent over the network. However, for production systems, consider generating entries on your server with the htpasswd CLI tool, which supports bcrypt hashing.
How do I add the generated entry to my Apache server?
Copy the output line and append it to your .htpasswd file on the server. Then reference that file in your Apache config with AuthUserFile /path/to/.htpasswd inside a Directory or Location block with AuthType Basic enabled.
Can I use .htpasswd with Nginx?
Nginx supports a similar format using the auth_basic directive. You can use the generated entries, but Nginx only supports certain hash formats. The Apache htpasswd tool with bcrypt or SHA is the most compatible approach.

More in Security & Privacy

All 10 security & privacy