.htpasswd Generator
Build Apache .htpasswd lines with bcrypt or SHA-1, locally in your browser.
Generate a username:hash entry suitable for Apache or Nginx Basic-Auth. Choose bcrypt (recommended) or SHA-1 (legacy). Output is a single line you can append to your .htpasswd file.
Common use cases
- Add or rotate credentials for a password-protected staging area
- Generate test fixtures that mimic Apache Basic-Auth setups
- Migrate plain-text shared credentials into a hashed file
- Quickly create one-off Basic-Auth credentials without installing htpasswd
Frequently asked questions
Which algorithm should I pick?▾
bcrypt. SHA-1 is included for compatibility with very old Apache configs but is no longer considered secure for password storage.
Where do I put the output?▾
Append the line to a .htpasswd file referenced from your server config (AuthUserFile in Apache, auth_basic_user_file in Nginx).
Is the password sent anywhere?▾
No. Hashing runs in JavaScript in your browser.
Related tools
{}
JSON Formatter & Validator
Beautify, validate and minify JSON instantly in your browser.
↔
JSON ↔ CSV Converter
Convert JSON arrays to CSV and CSV back to JSON.
B64
Base64 Encoder & Decoder
Encode and decode Base64 strings, including UTF-8 and binary.
%
URL Encoder & Decoder
Percent-encode and decode URL components safely.