About Htpasswd Generator

What is the htpasswd?

The Apache HTTP Server can use a .htpasswd file referenced from a .htaccess file to create restricted protected areas. The .htpasswd file contains rows corresponding to a pair of username and password separated with a colon character. The password is encrypted using the UNIX system's crypt method and may use MD5 or SHA1.

This .htpasswd generator creates passwords that are hashed using the MD5 algorithm. Those passwords can be used on any platform including Windows, MacOS and Linux.

How to generate htpasswd online?

Just enter username and password and an entry for a htpasswd file is generated. This htpasswd generator creates passwords that are hashed using the MD5 algorithm, which means that you can use it for sites hosted on any platform, including Windows and Linux. If you need to create several authentication records at once, you can use bulk htpasswd generator.

To generate a secure and strong password, use password generator.


How to protect folders in apache?

To protect a specific folder, a .htaccess file is placed in the directory you want the contents of the file to affect. The rules and configuration directives in the .htaccess file will be enforced on whatever directory it is in and all sub-directories as well. A typical .htaccess file looks like the following:

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

How to protect folders in apache?

To protect a specific folder, you need to update your website nginx config like:

location /api {
    auth_basic           "Administrator's Area";
    auth_basic_user_file /path/to/.htpasswd;
}

Alternatively, you you can limit access to the whole website with basic authentication but still make some website areas public. In this case, specify the off parameter of the auth_basic directive that cancels inheritance from upper configuration levels:

server {
    ...
    auth_basic           "Administrator's Area";
    auth_basic_user_file /path/to/.htpasswd;

    location /public/ {
        auth_basic off;
    }
}

Is it possible to save multiple entries in 1 htpasswd?

Yes, you can save multiple usernames and passwords. With each new line, there should be a new login entry.

100% Free, Always No Sign-up Required Files Deleted in 15 Min Private & Secure Works on All Devices

How to Use the Htpasswd Generator

  1. Open the tool — Visit the Htpasswd Generator page on Easy Code Tools. No login or download is needed.
  2. Enter your input — Type your text, paste your data, or upload your file into the input area provided.
  3. Adjust settings (if available) — Configure any options or parameters to match exactly what you need.
  4. Process — Click the main action button (e.g., Convert, Generate, Calculate). The result appears instantly.
  5. Use your result — Copy the output, download the file, or use the generated content as needed.

Frequently Asked Questions

Yes — the Htpasswd Generator is 100% free to use. There are no hidden charges, no subscriptions, and no account required. Just open the page and start using it right away.
No installation is needed. The Htpasswd Generator runs entirely in your web browser on any device — desktop, laptop, tablet, or smartphone. A modern browser like Chrome, Firefox, Edge, or Safari is all you need.
Absolutely. Easy Code Tools is built with your privacy in mind. Many tools process data directly in your browser without uploading anything to a server. When server-side processing is required, all uploaded files are automatically and permanently deleted within 15 minutes. We never store, sell, or share your files or personal data. See our Privacy Policy for full details.
The Htpasswd Generator uses established algorithms to deliver accurate, consistent results. All processing happens instantly in your browser or on our secure servers, ensuring speed and reliability every time.
Yes. Easy Code Tools is fully responsive and works perfectly on all screen sizes, including smartphones and tablets. You can also install it as a Progressive Web App (PWA) for instant one-tap access directly from your home screen.
Copied!