Skip to main content

Basic Auth Generator & Decoder

Build an Authorization: Basic header or decode one back to its user ID and password.

Input

Any text without a colon.

Colons are allowed.

Optional. Used only in the snippets; nothing is sent.

Output

The token, header and snippets appear here.

Enter a user ID and password to generate the header.

Basic Auth credentials are Base64-encoded, not encrypted. Use them only over HTTPS/TLS.

How to use

  1. 1.In Generate, enter the user ID and password, and optionally the request URL used in the snippets.
  2. 2.Copy the token, the Authorization header, or an HTTP, curl -u, curl -H or fetch snippet.
  3. 3.In Decode, paste a bare token, Basic <token> or a full Authorization: line; the user ID and the masked password appear on the right, with clear errors for wrong schemes, malformed Base64, non-UTF-8 bytes and missing colons.

Basic Auth Generator & Decoder

HTTP Basic authentication (RFC 7617) sends credentials as base64(user-id ":" password) after the word Basic in the Authorization header. This tool encodes the pair as UTF-8, the only charset RFC 7617 defines, and does not apply Unicode normalization. A user ID cannot contain a colon because the server splits on the first one; a password may contain any number of colons. Control characters are not allowed in either field. Base64 is an encoding, not encryption: anyone who sees the header can read the password, so send it only over HTTPS/TLS and prefer short-lived tokens where the API supports them.

Privacy

Credentials stay in this page's memory. They are never uploaded, saved to browser storage, added to the URL, logged or sent to analytics. Basic Auth credentials are Base64-encoded, not encrypted. Use them only over HTTPS/TLS.

Frequently asked questions
Is Basic Auth encrypted?
No. The token is only Base64-encoded, so anyone who sees it can decode the password. Send Basic credentials only over HTTPS/TLS.
Can the password contain a colon?
Yes. The decoded value is split on the first colon, so the password may contain colons. The user ID cannot.
Which character set is used?
UTF-8, as declared by RFC 7617 charset="UTF-8". Non-ASCII characters become multi-byte UTF-8 before Base64 encoding.

CodingTool is officially live on