Basic Auth Generator
Build an RFC 7617 Basic Authorization header value from a username and password without the credential leaving the browser.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Built a Basic credential for user "user" (4 character(s)); the password is present.
How it works
- Concatenated the username, a colon and the password exactly as RFC 7617 defines the user-pass form.
- Encoded the credential as UTF-8 bytes so non-ASCII characters are represented correctly.
- Base64-encoded the bytes with standard (RFC 4648 §4) padding and prefixed the scheme Basic.
- The credential is a secret. Treat the generated header value the same way you treat the password itself.
- Basic auth sends credentials with every request; use it only over TLS and never in a URL.
Methodology
- Build the user-pass string as `username:password`; RFC 7617 uses the first colon as the separator.
- Encode the string as UTF-8 bytes per RFC 7617 §2.1.
- Base64-encode the bytes with the standard RFC 4648 §4 alphabet and padding.
- Prefix the base64 value with the scheme `Basic ` and return it as the header value.
Usage
- Enter the username.
- Enter the password (an empty password is allowed).
- Copy the generated Authorization header value; it is created in memory only.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
Classic user:pass
{
"username": "user",
"password": "pass"
}Unicode password
{
"username": "alice",
"password": "pässwörd"
}Empty password
{
"username": "token",
"password": ""
}Limitations
Secret handling
The credential never leaves this page. There is no upload, no storage and no logging: the username and password are read into memory, the base64 value is computed, and both are discarded when the tab closes. Because the result is still a live credential, copy it only into a client you trust and keep it out of shell history, URLs and logs.
When to use Basic auth
Basic auth is the simplest HTTP authentication scheme and is still common for APIs and internal tools. Because every request repeats the credential, it should be scoped to a single service, rotated regularly, and never reused for a human account with broader access.
Frequently asked questions
- Is Basic auth secure?
- Only in the sense that base64 is not encryption by itself; the credential is readable by anyone who sees it. Basic auth is safe solely when the connection is TLS and the credential is treated as a secret.
- Why is the username encoded as UTF-8?
- RFC 7617 §2.1 prefers UTF-8 for the user-pass octets, so non-ASCII usernames and passwords survive the round-trip instead of being mangled by a legacy code page.
- Does this page save my password?
- No. The value is encoded in memory and is never persisted, logged, placed in a URL, or sent over the network.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.