Basic Auth Generator
Generate an HTTP Basic Auth header and htpasswd file line from a username and password for API debugging and Nginx/Apache access protection.
Enter a username and password to generate an HTTP Basic Auth header and a user line for an htpasswd file.
Useful for API debugging, Nginx/Apache Basic Auth setup, temporary protected pages, and copying authentication headers. Generation happens locally in your browser.
The username and password are processed only in this browser and are not submitted to the server. For production, prefer stronger bcrypt htpasswd entries when possible.
`{SHA}` is the required htpasswd marker for SHA-1 entries. Copy the whole line into .htpasswd or auth_basic_user_file.
If another system only needs the password digest itself, copy this value without the `{SHA}` prefix.
Common use cases
- Use this page when setting up Nginx, Apache, a reverse proxy, or a temporary protected endpoint and you need both the Basic Auth header and password-file line.
- It is useful during API debugging when a teammate needs a ready-to-copy `Authorization: Basic ...` header.
- When preparing `.htpasswd` or `auth_basic_user_file` content, you can generate one line here before placing it into your server config.