Skip to main content

htpasswd Generator

Generate .htpasswd entries for Apache and Nginx Basic Auth. Choose your hash format, enter credentials, and copy the ready-to-use line. Runs entirely in your browser.

✓ 60K+ developers trust DevPlaybook ✓ Runs 100% in your browser ✓ No sign-up required

Frequently Asked Questions

What is htpasswd?▼

htpasswd is a file format used by Apache and Nginx for HTTP Basic Authentication. It stores usernames alongside hashed passwords, allowing servers to restrict access to directories or URLs.

Which hash format should I use?▼

bcrypt ($2y$) is the most secure option and recommended for production. MD5 ($apr1$) is widely compatible with older Apache servers. SHA-1 ({SHA}) is deprecated. Plain text is only for testing — never use in production.

How do I use htpasswd with Nginx?▼

In your Nginx config, add: auth_basic "Restricted"; auth_basic_user_file /etc/nginx/.htpasswd; Then place the generated content in /etc/nginx/.htpasswd on your server.

Can this tool generate entries for multiple users?▼

Yes. Generate entries one at a time and append them to the same .htpasswd file. Each line is one user in the format username:hashed_password.

Is my password sent anywhere?▼

No. All hashing is done 100% in your browser using the Web Crypto API. Your password never leaves your machine.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →