Toolstia / Basic auth header generator

Basic auth header generator

HTTP Basic authentication sends the user name and password as one Base64 string in the Authorization header. Enter them to get the finished header and a curl example, or paste a header or token to see the user name and password inside.

Basic authentication is just Base64, not encryption. Anyone who sees the header can read the password, so only use it over HTTPS.

How it works

  1. Choose build or read.
  2. Enter the user name and password, or paste the header or Base64 token.
  3. Copy the header or the decoded values.

How it works

The user name and password are joined with a colon, encoded as UTF-8 and then turned into Base64. The header is the word Basic, a space and that string.

Not secret

Base64 is an encoding, not encryption. Anyone who can see the header can read the password, so Basic auth should only be used over HTTPS.

The colon rule

The user name cannot contain a colon, because the first colon marks the end of the user name. The password can contain colons.

Non-ASCII text

Accents and other characters are encoded as UTF-8, which is what modern servers expect.

Questions

Is my password sent anywhere?

Everything happens in your browser, and nothing you enter is sent anywhere.

Can I paste the whole header?

Yes. The tool accepts the full Authorization line, the part after Authorization, or just the Base64 token.

Why does decoding fail?

The text is not valid Base64, or it does not decode to a user name and password separated by a colon.