- What is htpasswd and what is it used for?
- htpasswd is a file format used by Apache HTTP Server to store usernames and password hashes for HTTP Basic Authentication. It allows web servers to protect directories or files with password-based access control. Each entry follows the format "username:password_hash" and is used with Apache's mod_auth modules to authenticate users before granting access to protected resources.
- Which password hashing algorithms are supported?
- The tool supports multiple hash algorithms: bcrypt (recommended for security), SHA-1 with salt, and traditional crypt variants. bcrypt is recommended because it uses adaptive hashing with configurable cost factors, providing strong resistance against brute force and rainbow table attacks. MD5 is deprecated and should be avoided for new implementations.
- How do I use the generated htpasswd entry?
- Copy the generated entry (format: "username:hash") and add it to your .htpasswd file. Then configure Apache to use this file for authentication using .htaccess directives or server configuration. Ensure the file has proper permissions (600) and is stored securely outside the web root when possible.
- Is it safe to generate htpasswd entries online?
- This tool generates hashes locally in your browser using Web Crypto API - your password never leaves your device. However, for production use, consider using command-line tools (htpasswd command) or server-side generation for additional security. Always use HTTPS when transmitting htpasswd files or credentials.
- Can I use htpasswd with other web servers besides Apache?
- Yes, htpasswd format is supported by Nginx (with auth_basic module), Caddy, and other web servers. The format is standardized, so entries generated by this tool work with any server that supports HTTP Basic Authentication with htpasswd files.