Basic Auth Header Generator
Generate an HTTP Basic Authentication header from a username and password, with the correct Base64 encoding and curl example.
Last reviewed by the Radiatus Cloud team
Generate an HTTP Basic Auth Authorization header from a username and password.
Need this built for your product?
We design, build & host secure software & APIs.
Generate HTTP Basic Auth headers
HTTP Basic Authentication sends a username and password with a request by combining them with a colon, encoding the result in Base64, and placing it in an Authorization header prefixed with the word Basic. This generator performs those steps for you and outputs the complete header line, the raw Base64 token, and a ready-to-run curl command. The encoding uses UTF-8 before Base64, so usernames and passwords containing accented or non-ASCII characters are handled correctly.
The result is exactly what a client or API consumer needs to authenticate against an endpoint that uses Basic Auth.
Using Basic Auth safely
Basic Authentication is simple and widely supported, which makes it popular for internal tools, quick scripts and testing APIs. Developers use this generator to craft the header for curl, Postman, or code, and to verify that an endpoint is receiving the credentials they expect.
Remember that Base64 is encoding, not encryption: anyone who sees the token can decode the username and password instantly. For this reason Basic Auth should only ever be used over HTTPS, so the header is protected in transit. Everything is generated locally in your browser, so your credentials are never sent anywhere by this tool.
Related tools
- JSON Formatter — Format and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
- JSON Validator — Validate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
- Regex Tester — Test regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.
- HTML Minifier — Minify HTML by removing comments and redundant whitespace, without breaking inline elements or pre blocks. Runs entirely in your browser.
Frequently Asked Questions
How is the Basic Auth token built?
The username and password are joined with a colon, encoded as UTF-8, then Base64-encoded and placed after the word Basic in the Authorization header.
Is Base64 encoding secure?
No. Base64 is reversible encoding, not encryption. Anyone who intercepts the token can decode the credentials, so always use Basic Auth over HTTPS.
Does it handle special characters?
Yes. The credentials are UTF-8 encoded before Base64, so accented letters and non-ASCII characters in the username or password work correctly.
Are my credentials uploaded?
No. The header is generated entirely in your browser, so the username and password never leave your device.
Can I use the token with curl?
Yes. The tool outputs a ready-to-run curl command with the Authorization header already filled in for quick testing.
Privacy & Security
Everything runs in your browser; nothing is uploaded.
How to Use
Enter a username and password to generate the Authorization header.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.
Related Tools
JSON Formatter
DeveloperFormat and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
JSON Validator
DeveloperValidate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
Regex Tester
DeveloperTest regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.