Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Web & CSS

HTTP Basic Auth Header

Build an Authorization: Basic header from a username and password, or decode an existing one back to its credentials. Handles non-ASCII characters correctly by encoding UTF-8 before base64.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

Options

Your result will appear here

Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.

How it works

What Basic auth actually sends

RFC 7617 joins the username and password with a colon, base64-encodes the result and sends it as Authorization: Basic <token>. Build mode hands back that finished header line, ready to paste into curl, a fetch call or an API client; decode mode splits the recovered string at the first colon back into a username and a password.

Why UTF-8 matters here

Base64 works on bytes, not characters, and older implementations encoded whatever the local code page happened to be. This tool encodes the credential string as UTF-8 first, so an accented username or a password in another script produces the token every browser agrees on. Entering nothing raises a warning that the token encodes an empty pair.

Decoding real headers

Paste the whole header line or just the token: a leading "Authorization:" and the "Basic " prefix are stripped case-insensitively and surrounding whitespace is ignored. The token must be valid base64, and once decoded must contain a colon; a missing colon gets its own error explaining the username:password form.

The security caveat, and where this runs

Basic auth encrypts nothing: the token is only base64, which anyone can reverse, and it is sent on every request by the client that holds it, so it is safe only over HTTPS and only for credentials you accept exposing. The encoding and decoding use the browser’s own functions in this tab, so a password you type to build a header stays on your device.

Questions

Where does the header go?

Send it as a plain HTTP header: Authorization: Basic <token>. The browser or HTTP client attaches it to every request; it never touches this page once you copy it.

Does Basic auth encrypt my password?

No. Base64 is an encoding, not encryption — anyone holding the header can read the credentials instantly. Only ever use it over HTTPS, and prefer a token-based scheme for anything sensitive.

Why did decoding fail with a colon error?

The base64 decoded correctly but contained no colon, so it cannot be a Basic credential pair. Check that you pasted the whole token and not just the username, and that the padding = characters were not dropped.

See category