Htpasswd Generator
Enter a username and password, then click “Add” to create an htpasswd line.
Your text and files never leave your browser — nothing is sent to a server.
The list only lives on this page. Copy or download it before you leave.
How to use
- Enter a username and password. Click “Generate” to create a random 16-character password.
- Unless you have a reason not to, keep bcrypt as the algorithm. A cost of 10 is a sensible default.
- Click “Add to list” and a “user:hash” line is added on the right. Adding the same username again replaces its line.
- Save the contents as a .htpasswd file on your server and point your .htaccess or Nginx config at that file.
FAQ
Is my password sent to a server?
No. Hashes are created inside your browser and the password is never transmitted. The generated line does not contain the plain password either.
What goes in .htaccess?
Add four lines: AuthType Basic, AuthName "Restricted", AuthUserFile /absolute/path/to/.htpasswd and Require valid-user. Keep the .htpasswd file outside your public web folder.
Why is the result different every time for the same password?
bcrypt and APR1 mix in a random salt on every run. The salt is stored in the line, so the server can still check the password — any of the lines will work.
Related tools
All tools
Unit Converters
- Unit Converter
- Temperature Converter
- Weight Converter
- Area Converter
- Length Converter
- Angle Converter
- Calorie Converter
- Data Size Converter
- Dry Volume Converter
- Electric Charge Converter
- Energy Converter
- Flow Rate Converter
- Force Converter
- Fuel Economy Converter
- Luminous Intensity Converter
- Magnetomotive Force Converter
- Power Converter
- Pressure Converter
- Radiation Dose Converter
- Speed Converter
- Time Unit Converter
- Volume Converter