Basic Auth Header Generator
Build or decode an HTTP Basic Authorization header.
Authorization header. Encoded locally; credentials never leave your browser.
This tool needs JavaScript enabled to run in your browser.
What this tool does
Build an HTTP Basic Authorization header from a username and password, or read one back into its parts. Basic auth is just base64("username:password") with a Basic prefix, and this tool encodes and decodes it, UTF-8 safe, in your browser.
Why testers reach for it
Plenty of APIs still use Basic auth, and you need the exact header to try a request in curl, Postman or a test. Building it by hand is fiddly, and pasting real credentials into a web encoder hands them to a third party. Encoding locally keeps the username and password on your machine.
A word on security
- Base64 is encoding, not encryption. Anyone who sees the header can read the credentials, so Basic auth must only travel over HTTPS.
- A password may itself contain a colon; the first colon separates the username, and the rest is the password.
- Use test credentials here, not a real production password.
Common use cases
- Building the header for a curl or Postman request.
- Reading the credentials out of a header you found in a log.
- Checking that special characters in a password encode correctly.
Frequently asked questions
- Is Basic auth secure?
- Base64 is encoding, not encryption. Anyone who sees the header can read the credentials, so Basic auth must only be sent over HTTPS.
- Are my credentials uploaded?
- No. The header is built in your browser, so use test credentials and nothing leaves the page.
Learning resources
Testsmith also runs hands-on courses and a free practice app for the skills behind this tool.