htpasswd Generator
Generate htpasswd password hashes for Apache and Nginx HTTP Basic Authentication. Supports MD5 (apr1), bcrypt, SHA-1, and plaintext formats.
Input
Output
Readme
What is htpasswd?
Htpasswd is a file format used by Apache HTTP Server and other web servers to store usernames and encrypted passwords for HTTP Basic Authentication. Each line in an htpasswd file contains a username and a hashed password separated by a colon. This authentication method protects web directories, APIs, and resources by requiring visitors to enter valid credentials before accessing protected content.
The passwords in htpasswd files are never stored in plain text (unless explicitly configured). Instead, they use cryptographic hashing algorithms like MD5, bcrypt, or SHA-1 to create one-way hashes that can verify passwords without exposing the original values.
Tool description
This htpasswd generator creates properly formatted htpasswd entries for use with Apache, Nginx, and other web servers that support HTTP Basic Authentication. Enter a username and password, select your preferred hashing algorithm, and instantly generate a ready-to-use htpasswd line that you can add to your .htpasswd file.
Examples
Input:
- Username:
admin - Password:
secretpassword - Algorithm: MD5 (apr1)
Output:
admin:$apr1$x8m6AHel$nsaOYn3kJDoL6.qLnk3Al.
Input:
- Username:
webuser - Password:
mypassword123 - Algorithm: bcrypt
Output:
webuser:$2b$10$9nqI.uk3y90NZEfuFZ5DluVIOkQsHlTKCSLP4oVYUuuCg/5J5XYBO
Features
- Multiple hashing algorithms: Supports MD5 (apr1), bcrypt, SHA-1, and plain text formats
- Real-time generation: Hash updates instantly as you type username or password
- Password visibility toggle: Show or hide password input for easier entry
- One-click copy: Quickly copy the generated htpasswd entry to clipboard
- Download .htpasswd file: Download the generated entry as a ready-to-use .htpasswd file
Use cases
- Protecting staging or development websites with password authentication
- Securing admin panels and sensitive directories on web servers
- Creating user credentials for Apache or Nginx HTTP Basic Authentication
- Generating htpasswd entries without command-line access to the htpasswd utility
- Setting up simple authentication for internal tools and documentation sites