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

The credential is a secret. It is encoded in memory only and never stored or sent.

Authorization value
Basic dXNlcjpwYXNz
Scheme
Basic
Username length
4 character(s)
Password
present

Supported formats

Input
text, password
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

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

  1. Build the user-pass string as `username:password`; RFC 7617 uses the first colon as the separator.
  2. Encode the string as UTF-8 bytes per RFC 7617 §2.1.
  3. Base64-encode the bytes with the standard RFC 4648 §4 alphabet and padding.
  4. Prefix the base64 value with the scheme `Basic ` and return it as the header value.

Usage

  1. Enter the username.
  2. Enter the password (an empty password is allowed).
  3. 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

jsonSelect to copy
{
  "username": "user",
  "password": "pass"
}

Unicode password

jsonSelect to copy
{
  "username": "alice",
  "password": "pässwörd"
}

Empty password

jsonSelect to copy
{
  "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

  1. RFC 7617 — The 'Basic' HTTP Authentication Scheme — IETF
  2. RFC 4648 — The Base16, Base32, and Base64 Data Encodings — IETF