htpasswd Generator screenshot

htpasswd Generator

Generate an Apache htpasswd line in your browser with bcrypt, SHA-1 or APR1. Choose the user name and the cost; a fresh salt is drawn per run.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What this htpasswd generator does

bcrypt is the default because it is the only one of the three that is deliberately slow; the cost factor is stored inside the hash, so raising it later still verifies old lines. SHA-1 and APR1 are offered for legacy servers, and the page says so rather than implying they are equally safe.

How to use it

htpasswd Generator: paste the password into the box above, set User name (default "user"), Algorithm (default "bcrypt"), bcrypt cost (default 10) and APR1 salt (blank = random), default blank, and press Run to get the htpasswd line below.

Worked example

Input:

correct horse battery staple

Output:

user:$2b$10$7kHLvev1mrW/o/qfc48.lObyandY65TTsGzKibe5ykvQx7iCis5ta

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads password and returns htpasswd line; reloading the page discards both.

bcrypt is the default because it is the only one of the three that is deliberately slow; the cost factor is stored inside the hash, so raising it later still verifies old lines. SHA-1 and APR1 are offered for legacy servers, and the page says so rather than implying they are equally safe.

Generate an Apache htpasswd line in your browser with bcrypt, SHA-1 or APR1. Choose the user name and the cost; a fresh salt is drawn per run.

How to use it

htpasswd Generator: paste the password into the box above, set User name (default "user"), Algorithm (default "bcrypt"), bcrypt cost (default 10) and APR1 salt (blank = random), default blank, and press Run to get the htpasswd line below.

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads password and returns htpasswd line; reloading the page discards both.

What to Expect

Best for

  • Converting password to htpasswd line when the data is already on screen.

What this tool keeps

  • Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.

Sample input

correct horse battery staple

Sample output

user:$2b$10$7kHLvev1mrW/o/qfc48.lObyandY65TTsGzKibe5ykvQx7iCis5ta

Frequently asked questions

How do I use the htpasswd generator?

htpasswd Generator: paste the password into the box above, set User name (default "user"), Algorithm (default "bcrypt"), bcrypt cost (default 10) and APR1 salt (blank = random), default blank, and press Run to get the htpasswd line below.

Is my input uploaded?

No. The text is parsed on this page with JavaScript and is never posted to a server.

Is there a size limit?

Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.