Generate the Authorization header value for HTTP Basic Authentication from a username and password.
HTTP Basic Auth encodes credentials as username:password in Base64, then prepends Basic to form the header value:
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=The encoding is done entirely in your browser — credentials are never sent to a server.
| Field | Description |
|---|---|
| Authorization Header | The full header ready to paste into a request |
| Base64 Token | Just the encoded credential string |
| Decoded | The raw username:password string before encoding |
# curl
curl -H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=" https://example.com/api
# or use the shorthand
curl -u username:password https://example.com/api