Basic auth generator
Generate a base64 basic auth header from a username and password.
About Basic auth generator
Builds the Authorization header for HTTP Basic authentication from a username and password: the two are joined with a colon and Base64-encoded, giving Authorization: Basic dXNlcjpwYXNz.
When you would use it
- Calling an API or a protected endpoint with curl, Postman or a script that needs the raw header.
- Checking what a client sends when it uses Basic auth, for example to debug a 401.
- Configuring a webhook or an integration that only accepts a pre-built header.
How to use it
- Type the username and the password.
- Read the complete header line.
- Copy it into your request (for curl: -H "Authorization: Basic ...").
Things worth knowing
- Base64 is encoding, not encryption. Anyone who sees the header can read the password, so Basic auth is only acceptable over HTTPS.
- The username cannot contain a colon, because the colon separates it from the password. Passwords may contain colons.
- Non-ASCII characters are encoded as UTF-8 before Base64, which is what modern servers expect; a few old systems expect Latin-1 and will reject such passwords.
- The computation happens in your browser; nothing is sent anywhere. Still, prefer test credentials when trying things out.
Frequently asked questions
- Why does the server still answer 401?
- Check that the header reaches the server (proxies and some frameworks strip it), that the realm expects Basic rather than Bearer or Digest, and that the credentials are correct. Spaces or line breaks copied around the header are another frequent cause.
- Can I decode a header back to the credentials?
- Yes: paste the part after Basic into the Base64 decoder tool. That is exactly why Basic auth must only be used over an encrypted connection.