Zum Hauptinhalt springen
Security

htpasswd Generator

Create htpasswd-style credential lines for basic auth.

Generated in your browser. For production, prefer a bcrypt htpasswd created on the server.

About this tool

Free htpasswd generator. Produce a username and hashed password line for Apache/Nginx basic authentication, useful for protecting staging sites and admin paths.

Frequently asked questions

Where does the .htpasswd file go?

Outside the web root where possible, and referenced from your Nginx or Apache config.

Which hashing should I use?

bcrypt (htpasswd -B) is the modern choice. This tool demonstrates the format; generate the real hash on the server for production.

Can I protect a whole site?

Yes — basic auth in front of a staging site is a common way to keep it out of search engines and prying eyes.

Need more than a tool?

HostingSwift runs the servers too — VPS, web hosting, email, DNS and streaming, with a free tier to start.