Basic Auth Header Generator
Turn a username and password into a Basic Authorization header.
How to use
Type a username and password. The Authorization header updates live below — click Copy to grab the full header or just the encoded value.
About this tool
Enter a username and password and get the HTTP Basic Authorization header value — base64-encoded as the standard expects. Useful for testing APIs with curl, Postman, or fetch. Encoding happens entirely in your browser, so your credentials are never sent anywhere.
What you can use Basic Auth Header Generator for
- Test an API endpoint that uses Basic auth
- Build an Authorization header for a curl command
- Set up a request in Postman or a REST client
- Add Basic credentials to a fetch call
Frequently asked questions
How is the header formed?
HTTP Basic auth joins the username and password with a colon (username:password), base64-encodes that string, and prefixes it with 'Basic '.
Are my credentials sent anywhere?
No. The encoding runs entirely in your browser — nothing is uploaded or logged. Note that Basic auth itself is only secure over HTTPS.
Does it handle Unicode characters?
Yes — the credentials are UTF-8 encoded before base64, so non-ASCII characters in the password work correctly.