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.
Add this line to your .htpasswd file. Each user gets one line.
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.
Related Products
on GumroadPremium Workflow Pack
Production-grade workflows, architecture guides, and deployment scripts for teams that ship. 10 advanced CI/CD workflows (blue-green, canary, E2E, security), 5 architecture deep-dives, code review checklist, PR process guide, and 5 battle-tested Bash deployment scripts.
Buy on Gumroad →GitHub Actions CI/CD Templates Pack
12 production-ready GitHub Actions workflow templates covering Node.js, Python, Docker, multi-environment deployments, security scanning, and auto-changelog. Copy, paste, ship.
Buy on Gumroad →Developer Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →You Might Also Need
nginx Config Generator
Generate production-ready nginx server blocks instantly. Supports static sites, reverse proxy (Node.js, API), PHP-FPM, and HTTPS redirects. Includes SSL/TLS, gzip, cache headers, security headers, and
Open free tool →
nginx Config Builder
Build nginx server blocks and location blocks with a visual form. Configure reverse proxy, static file serving, WebSocket, CORS, gzip, and security headers. Generates copy-ready nginx config snippets.
Open free tool →
HTTP Security Headers Generator
Generate HTTP security headers configuration for nginx and Apache. Configure HSTS, CSP, X-Frame-Options, Referrer-Policy, and more with toggle switches. Copy ready-to-use configs.
Open free tool →
More Free Tools
Related Articles
Complete Guide to HTTP Security Headers: CSP, HSTS, and Modern Browser Security 2026
Master HTTP security headers in 2026: Content-Security-Policy configuration, HSTS preloading, Permissions-Policy, COEP/COOP for cross-origin isolation, and real-world configs for nginx, Apache, and Next.js.
DevSecOps Tools Checklist 2026: 20 Essential Tools for Shift-Left Security
Complete DevSecOps tools checklist for 2026. 20 essential SAST, DAST, SCA, secrets scanning, and container security tools with free/open-source options.
Kubernetes Security Hardening: 15 Essential Practices
A comprehensive guide to Kubernetes security hardening—RBAC, Pod Security Standards, network policies, secrets management, and container scanning with real examples.
Nginx Configuration Guide for Web Developers 2026: Reverse Proxy, SSL & Performance
Master Nginx configuration in 2026. Complete guide covering reverse proxy setup, SSL/TLS with Let's Encrypt, gzip compression, caching, rate limiting, load balancing, and common gotchas.
Zero-Trust Architecture Implementation Guide for Developers 2026
Practical zero-trust architecture guide for developers: identity verification, network segmentation, service mesh, mTLS, and step-by-step implementation roadmap.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →