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

How to use it

  1. Type the username and the password.
  2. Read the complete header line.
  3. Copy it into your request (for curl: -H "Authorization: Basic ...").

Things worth knowing

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.

All the tools