HTTP-auth Generator
Generate .htpasswd credentials (Apache {SHA} format) and matching .htaccess Basic Auth configuration. Runs entirely in your browser.
🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.
Uses the Apache {SHA} password format (SHA-1, base64-encoded) - widely supported for HTTP Basic Auth over .htpasswd files.
How the HTTP auth generator works
- Enter a username, password, and realm (the message shown in the login prompt).
- Copy the generated .htpasswd line and .htaccess configuration.
- Upload both to your Apache server, adjusting the AuthUserFile path to match.
FAQ
What is HTTP Basic Auth?
A simple password-protection method built into web servers like Apache, where visitors see a browser login prompt before accessing a page or directory - configured via .htaccess and a .htpasswd credentials file.
What password format does this use?
The Apache {SHA} format - a SHA-1 hash of your password, base64-encoded - one of the classic formats htpasswd files support, computed using the Web Crypto API.
Where do these files go on my server?
Save the .htpasswd content to a file (commonly named .htpasswd) outside your public web root, and add the generated .htaccess rules to your directory's .htaccess file, updating the AuthUserFile path to match.
Is my password sent anywhere?
No - the hash is computed entirely in your browser using the Web Crypto API. Nothing is transmitted to a server.
How we compare
| Feature | Online Tool Store | htpasswd CLI tool | Hosting panel password protection |
|---|---|---|---|
| No install required | ✓ | ✗ | ✓ |
| Generates both files at once | ✓ | ✗ | ✗ |
| Works without hosting account access | ✓ | ✓ | ✗ |
Useful for quickly password-protecting a staging site or admin directory without installing Apache utilities.