🔑 Basic Auth Header Generator
Generate and decode HTTP Basic Authorization headers locally in your browser.
Last updated: November 8, 2026 · By the BoltQuickTools team
Build or read an HTTP Basic Authorization header
Testing an endpoint that uses Basic auth means producing a Base64 string of username:password, and shell quoting makes that error-prone when the password has special characters. Going the other way, you may have a header from a log and need to know which account it belongs to. This page handles both.
Using the two halves of the page
- Fill in Username and Password. Base64 Token and Authorization Header update shortly after you stop typing, or right away if you click Generate.
- Use Copy Token or Copy Header. Load Sample fills in a demo account.
- To read one, paste it under Decode Header or Token and click Decode. The results appear in Decoded Username and Decoded Password.
- Clear empties every field on the page, including the generator.
Two tokens, decoded and encoded
The sample account, username api_user and password changeme123, produces:
Authorization: Basic YXBpX3VzZXI6Y2hhbmdlbWUxMjM=
Non-ASCII characters are encoded as UTF-8. Username josé and password pa:ss€ give the token am9zw6k6cGE6c3Pigqw=, which decodes back to the same pair. The colon inside the password survives because the decoder splits on the first colon only.
Edge cases in the decoder and generator
- A colon in the username cannot round-trip. Username
a:bwith passwordcdecodes as usernameaand passwordb:c. The Basic auth specification forbids colons in the username, but this tool will not stop you. - The prefix has to be complete.
Authorization: Basic dXNlcjpwYXNzin any letter case works, and so does the bare token. A value of justBasic dXNlcjpwYXNzreportsInvalid Base64 token. - Any valid Base64 "succeeds".
aGVsbG8=decodes to usernamehelloand an empty password, with the statusDecode successful.That message does not mean it was a real credential. - Tokens made in Latin-1 come out wrong. The decoder assumes UTF-8, so
dXNlcjpw4HNz, which holdspàssin Latin-1, shows asp�ss. Older servers and clients sometimes use Latin-1, so check this if a non-English password fails. - Nothing is trimmed when generating. A trailing space pasted into a field becomes part of the credential.
- The password field shows plain text, so take care when sharing your screen.
Does Base64 protect the password?
No. It is an encoding that anyone can reverse, as the decoder here shows. Basic auth is only safe inside HTTPS, because the header is sent with every request. The web security basics article covers transport security in more detail.
Do the credentials leave my browser?
The tool's code only uses TextEncoder and btoa and makes no network request with what you type. Like every page here, it also loads Google web fonts, the site's analytics script, and ad scripts if you accept them. For production credentials, the habit worth keeping is to build the header on your own machine, for example with curl -u user:password, which writes the same header for you.
How do I test the header once I have it?
Paste it into your client, or use the API tester, whose Headers tab takes Authorization as the name and the Basic ... part as the value. If you only need the raw encoding of some other text, the Base64 encoder is simpler.