Basic Auth Header Generator is a free tool that creates the HTTP Authorization header for Basic authentication from a username and password, and decodes existing headers back into credentials. It works in your browser, so nothing you type is sent anywhere.
How to create a Basic auth header
- Enter the username and password.
- Copy the full header (
Authorization: Basic …) or just its value. - Add it to your request, API client or configuration.
How Basic authentication works
The client joins the username and password with a colon, encodes the result withBase64, and sends it in the Authorization header. For example,Aladdin:open sesame becomes Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==. If credentials are missing, the server answers 401 Unauthorized with a WWW-Authenticate header.
Security
- Base64 is an encoding, not encryption; the decoder on this page reverses it instantly. Always use HTTPS.
- The credentials are sent with every request, so prefer tokens (such as OAuth or API keys) for public APIs.
- With curl,
-u user:passbuilds this header for you.
Troubleshooting a 401 response
- Wrong characters after decoding. Paste the header into the decoder above to check the exact username and password being sent, including stray spaces.
- Special characters in the password. Letters outside plain English, such as é, are encoded as UTF-8 here; a few older servers expect a different encoding and reject them.
- A colon in the username. The first colon separates username from password, so usernames can’t contain one.
- The header never arrives. Some proxies strip
Authorization; check what the server received with the HTTP Headers Analyzer.
Frequently asked questions
How is the header built?
The username and password are joined with a colon, encoded as UTF-8 and then Base64, and prefixed with “Basic ”: user:pass becomes Basic dXNlcjpwYXNz.
Is Basic auth secure?
Only over HTTPS. Base64 is not encryption, so anyone who can see the request can read the password, as the decoder on this page shows.
Are my credentials sent anywhere?
No. The header is built in your browser and nothing is transmitted.
Last updated