htpasswd Generator
Create Apache and Nginx basic-auth credentials with bcrypt, SHA-1 or MD5-crypt.
An .htpasswd file stores usernames and hashed passwords for HTTP basic authentication in Apache and Nginx. This generator produces the line using bcrypt — salted and deliberately slow — with the $2y$ prefix Apache expects, and can merge the entry into an existing file.
Runs in your browser- Privacy
- Runs entirely in your browser — nothing is uploaded
- Cost
- Free, unlimited, no sign-up
Frequently asked questions
Is basic auth secure?
How to use the htpasswd generator
- 1Enter or paste your username.
- 2Enter the password — it stays in your browser and is never sent anywhere.
- 3Choose the hash.
- 4Set the bcrypt cost.
- 5Enter or paste your existing .htpasswd (optional).
- 6Press Run, then download the result when it is ready.
Embed this tool
Put the working htpasswd generator on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.
Share this tool
Related tools
Log File ParserParse Apache, Nginx or JSON log lines into a sortable table with traffic summaries.Sample Log File GeneratorGenerate realistic Apache, Nginx, JSON, syslog or application logs with a controllable error rate.Bcrypt Hash GeneratorHash a password with bcrypt at a configurable cost factor — the right way to store passwords.Redirect Rule GeneratorGenerate redirect rules for Apache, Nginx, Netlify, Vercel and Next.js.AES Text EncryptorEncrypt and decrypt text with AES-256-GCM and a passphrase, entirely in your browser.X.509 Certificate DecoderDecode a PEM certificate to see its subject, issuer, validity, SANs and key details.
Last updated
More hash & crypto tools