Enter a username and password to build a file line. Hashing is local. FlashKit never sees the password unless you are on a compromised machine.
This implements SHA-1 ({SHA}) and plain text. It does not implement bcrypt, APR1, or MD5-crypt. Plain text is only for throwaway local tests. SHA-1 basic auth is what many shared Apache hosts still accept; it is not a 2026 recommendation for anything sensitive. Apache and Nginx config, plus why this page is not bcrypt, is in password-protect a folder with .htpasswd. Apache htpasswd command examples (bcrypt with -B) are on the blog; this page still only writes {SHA} or plain.
Worked example. User demo, password from the password generator, algorithm SHA. The line looks like demo:{SHA}…. Paste it into .htpasswd and point AuthUserFile at that file. Serve the location over HTTPS — Basic auth without TLS sends credentials in an easily decoded header.
How to generate an htpasswd line
- Type the username and a unique password (use the password generator).
- Choose SHA for classic Apache basic auth, or plain only for a local experiment you will delete.
- Copy the line into .htpasswd. Point .htaccess AuthUserFile at it.
- Use HTTPS. Basic auth without TLS sends credentials in an easily decoded header.
Key Features
- Local SHA-1 ({SHA}) htpasswd line
- Optional plain-text line for throwaway tests
- No FlashKit account
- Pairs with .htaccess and password tools — bcrypt is not included
Algorithms this page does and does not implement
- {SHA} is SHA-1 of the password, Base64, prefixed as Apache expects.
- Plain stores the password as-is. Never deploy that on a public host.
- bcrypt, APR1, and md5-crypt are not here. If your host requires them, use htpasswd on the server.
- Netlify, Vercel, and most JAMstack hosts ignore .htpasswd. Use their dashboard auth instead.
demo and battery-staple, in {SHA}
- Username demo and password battery-staple, algorithm SHA, produce the single line demo:{SHA}WBDS8Qr1dtWNToPicKXDbo9zDvE=. The token after {SHA} is the Base64 encoding of the SHA-1 digest of the password bytes. There is no salt and no iteration count. The same password always produces that same token.
- Plain mode writes demo:battery-staple with the password visible. That line is for a throwaway file you will delete. It is not a hash. A second user is a second line. The page does not merge lines or sort them.
- The username is copied as typed. demo and Demo are different Apache users. A colon inside the username breaks the file format, because the first colon separates the name from the hash.
What Apache will not accept from this line
- bcrypt ($2y$), APR1 ($apr1$), and MD5-crypt are not produced. A host that requires htpasswd -B will reject the {SHA} line. Generate that hash on the server. Netlify, Vercel, and other hosts that do not read .htpasswd will ignore the file entirely.
- {SHA} is unsalted SHA-1. Two users who pick battery-staple get the same hash, and a precomputed table can try common passwords offline if the file leaks. Use it only where the host still demands this legacy form, and only over HTTPS. Basic auth on plain HTTP sends the password on every request.
- The page does not write the AuthType Basic block. The .htaccess generator does not write the hash either. You still point AuthUserFile at the file that contains this line.
How to install one line
- Generate a unique password, choose SHA, copy the line into .htpasswd outside the web root if the host allows it, and set AuthUserFile to that path. Restart or reload Apache if the host caches the file. Try the username in a private window.
- If the dialog keeps failing, the usual causes are a plain-text line on a host that expects {SHA}, a wrong AuthUserFile path, or a hash created for a different password than the one you are typing.
Frequently Asked Questions
Is SHA-1 htpasswd still recommended?
It is what many shared hosts still accept. Prefer your platform’s SSO or bcrypt-capable auth for anything sensitive.
Do you store the password?
No. Close the tab on shared computers.
Can I generate bcrypt htpasswd?
Not on this page. Use the Apache htpasswd CLI or your host’s auth UI if you need bcrypt.