Loading...

Htpasswd Generator

Htpasswd is a command-line tool used to create and update the flat-files used to store usernames and passwords for basic authentication of HTTP users in Apache web servers. This tool generates htpasswd entries compatible with Apache HTTP Server.

Generate Htpasswd Accounts
Five rows are provided. Enter usernames on the left and passwords on the right. Add rows as needed, up to 100. Completely empty rows are skipped; password spaces and colons are preserved.
Bcrypt is the most secure option and recommended for new installations.
Bcrypt: up to 72 UTF-8 bytes; DES: up to 8 bytes. Longer passwords are rejected, not truncated.
If your browser saves the file as htpasswd.txt or htpasswd, rename it to .htpasswd before uploading it.
How to use?

Copy the generated username:hash lines or download .htpasswd. Each line contains one account and its hash, not the plain password. Store the file outside your web root.

Verify Htpasswd Entry
Htpasswd Entry Format

Htpasswd entries follow the format:

username:password_hash

Different algorithms have different hash formats:

  • Bcrypt: $2y$ prefix
  • MD5: $apr1$ prefix
  • SHA-1: {SHA} prefix
  • Crypt: No prefix (DES)
Security Information

Important notes about Htpasswd:

  • Store .htpasswd files outside your web document root for security.
  • Use Bcrypt algorithm for new installations - it's the most secure option.
  • MD5 with Apache salt ($apr1$) is acceptable for legacy systems.
  • Avoid SHA-1 and Crypt (DES) for new installations - they're less secure.
  • This tool processes all data in your browser - no credentials are sent to our server.
  • Regularly update passwords and use strong, unique passwords for each user.
Apache Configuration

To use .htpasswd file in Apache, add this to your .htaccess or virtual host configuration:

AuthType Basic
AuthName "Restricted Area"
AuthUserFile /path/to/.htpasswd
Require valid-user

Replace /path/to/.htpasswd with the actual path to your .htpasswd file.

Follow VuiZ.Net on Google Search

Add VuiZ.Net as a preferred source on Google to find your favorite tools more easily.

  • Find your tools again
  • Discover new utilities
  • Support VuiZ.Net
Follow

About Htpasswd Generator

Create a single account or a batch of up to 100 accounts for Apache HTTP Basic Authentication. Each output line contains a username and its password hash.

The form starts with five rows, with usernames on the left and passwords on the right. Fill only the rows you need, add more as needed, then copy or download .htpasswd. Hashing and verification run in your browser without sending credentials to the server.

Key features

  • Single or multiple accounts One form handles both single accounts and batches, starting with five paired input rows. Add or remove rows up to 100 accounts. Completely empty rows are ignored and duplicate usernames are rejected.
  • Exact password handling Usernames and passwords have separate fields. Password colons and spaces are preserved exactly; usernames are trimmed. Password fields are masked until Show passwords is enabled.
  • Shared algorithm and progress Apply bcrypt with cost 10, Apache MD5, SHA-1 or DES crypt to the whole batch. Bcrypt uses a separate random salt for each account, with progress shown during generation.
  • Copy, download and verify Copy all generated username:hash lines or download .htpasswd. Paste one generated line into the verification panel to check its password.

How to use Htpasswd Generator

Generate a password file from one account or a list of accounts, then verify a generated entry.

  1. Enter the accounts Fill a username on the left and password on the right. Five rows are provided; leave unused rows empty or use Add account for more rows.
  2. Choose an algorithm Keep bcrypt for new entries. It accepts passwords up to 72 UTF-8 bytes; DES generation accepts up to 8 bytes. The selected algorithm applies to every account.
  3. Generate the entries Click Generate accounts. Correct any reported row error, then wait for the progress counter to finish.
  4. Export the password file Copy the output or click Download .htpasswd. Store the file outside the web document root and reference its filesystem path in AuthUserFile.
  5. Verify an individual account Paste one username:hash line into Verify Htpasswd Entry, enter its original password and click Verify Password.

Usage tips

  • Store .htpasswd outside the public document root and restrict filesystem permissions.
  • Serve Basic Auth only over HTTPS because credentials are merely Base64-encoded in transit.
  • Prefer bcrypt where the deployed Apache version supports it; avoid cryptographically weak legacy schemes.
  • Passwords are not trimmed. Choose Reset to clear the generation fields and result. Editing the inputs clears outdated output.

Frequently asked questions

The form starts with five rows, with a username field on the left and password field on the right. Click Add account for each extra row, up to 100. Remove unwanted rows with the cross button; completely empty rows are skipped.
Completely empty rows are ignored. A duplicate username, missing username or missing password stops generation and reports the row number. Password spaces and colons are preserved. The batch is validated before any output is published.
Bcrypt uses an independently generated random salt for each account. Different hashes for the same password are expected. The generator uses cost 10 and outputs the Apache $2y$ prefix.
Usernames are limited to 255 UTF-8 bytes and cannot contain colons or control characters, or start with #. Bcrypt generation rejects passwords over 72 bytes, and DES generation rejects passwords over 8 bytes instead of truncating them. MD5, SHA-1 and DES are legacy choices; DES support depends on the server platform.
The tool hashes and verifies credentials in your browser. It does not upload the account list. Download or copy the hash output, store .htpasswd outside the public document root and use HTTPS for Basic Authentication.