Basic Auth Header Generator

Generate an HTTP Basic Auth header from a username and password, or decode a header you've captured back into its parts. The tool builds Authorization: Basic with UTF-8-safe Base64 as RFC 7617 recommends, and gives the same credentials as cURL and fetch snippets. It's free and runs entirely in your browser — the credentials never leave your device.

Example

StepValue
CredentialsAladdin / open sesame
JoinedAladdin:open sesame
Base64QWxhZGRpbjpvcGVuIHNlc2FtZQ==
HeaderAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

When to use it

  1. Call an API that uses Basic auth from Postman, cURL or a script.
  2. Check which credentials a captured request is sending.
  3. Test a staging site protected by a password prompt.
  4. Debug a 401 caused by a mis-encoded non-ASCII password.

How to Use

  1. Enter the username and password.
  2. Copy the header, or the cURL or fetch snippet.
  3. To decode, paste a header or token into the Decode box.

Features

  1. UTF-8-safe Base64 per RFC 7617
  2. Decode headers and bare tokens
  3. cURL and fetch snippets
  4. Show/hide password
  5. Colon-in-username check
  6. 100% client-side

FAQs

How is the Basic auth header built?

Join username and password with a colon, encode that as UTF-8 Base64, and send Authorization: Basic followed by the result.

Is Basic authentication secure?

Only over HTTPS. Base64 is encoding, not encryption — anyone who sees the header can decode the password instantly.

Can the username contain a colon?

No. The server splits at the first colon, so it would cut the username short. The password may contain colons.

Why do non-English passwords fail on some servers?

Older clients encoded credentials as Latin-1. This tool uses UTF-8, which RFC 7617 recommends; the server must agree.

Are my credentials sent anywhere?

No. Encoding and decoding happen in your browser.

Technical Details

HTTP Basic authentication, defined in RFC 7617, sends credentials as the word Basic followed by the Base64 encoding of username:password. The generator encodes the pair as UTF-8 before Base64, so accented or non-Latin characters survive — the older behavior of encoding as Latin-1 garbles them, and RFC 7617 recommends UTF-8. Because the server splits the decoded string at the first colon, a username containing a colon can't be represented and is rejected; a colon in the password is fine. The decoder accepts a full Authorization: Basic header, the bare token, or Base64url, and reports invalid Base64, non-UTF-8 bytes and a missing separator separately. Snippets show the same credentials for cURL and fetch. Base64 is reversible encoding, not encryption, which the page states plainly: the header must only travel over HTTPS. Nothing is transmitted, but using test credentials in any online tool is good practice.

Developer Tools

Developer Tools

  • Hex Dump Viewer
  • Text Encoding Inspector
  • Punycode Converter
  • Email Obfuscator
  • UUID Validator
  • ULID Generator
  • SemVer Compare
  • Bitwise Calculator