Skip to content
epitometool

Basic auth header generator

Security tools

Generate Authorization: Basic header values from username and password pairs.

Updated

Credentials

Authorization header

Quick start

How to generate Basic auth header

Enter credentials and produce Authorization header value.

  1. Step 1
    Set username/password

    Enter credentials.

  2. Step 2
    Generate

    Build Base64 Authorization value.

  3. Step 3
    Use in requests

    Paste into API clients or curl commands.

In-depth guide

HTTP Basic authentication headers: how they work and how to test them

HTTP Basic authentication is the simplest way to attach credentials to a request: the username and password are joined with a colon, Base64-encoded and sent in an Authorization header. It is defined in RFC 7617 and supported by every HTTP client. This tool builds the header value for you locally so you can paste it straight into curl, Postman or a fetch call.

How the header is built

The server expects Authorization: Basic <token>, where the token is base64(username:password). For example, aladdin:opensesame becomes Basic YWxhZGRpbjpvcGVuc2VzYW1l. Base64 is reversible encoding, not encryption — anyone who sees the header can read the password.

How to use this tool

  1. Enter the username and password.
  2. Copy the generated Authorization header value.
  3. Add it to your request, e.g. curl -H "Authorization: Basic ..." https://api.example.com.

When to use it vs alternatives

Basic auth is fine for quick API testing, internal tools and staging diagnostics behind HTTPS. For anything user-facing or long-lived, prefer bearer tokens, OAuth 2.0 or API keys that can be scoped and revoked without changing a password.

Security and privacy

Only ever send Basic auth over HTTPS. Over plain HTTP the password travels in effectively clear text on every request.
  • The credential is sent on every request, so a leaked log or proxy capture exposes it repeatedly.
  • Avoid embedding real production credentials in shared scripts or documentation generated from this header.
  • Privacy: the encoding happens entirely in your browser — the username and password are never uploaded.

Common pitfalls

  • Check the result before replacing the original input.
  • Watch for unit, format, encoding, and browser memory limits on large inputs.
  • Keep a copy of important source material until the output is verified.

Frequently asked questions

What exactly does this generate?

The value for an HTTP Authorization header using Basic authentication: the word Basic followed by base64(username:password), per RFC 7617.

Is Base64 encoding the same as encryption?

No. Base64 is reversible encoding, not encryption. Anyone who sees the header can decode the username and password, which is why HTTPS is essential.

How do I use it with curl?

Pass it as a header, for example curl -H "Authorization: Basic <value>" https://api.example.com. Most HTTP clients also accept username and password directly.

Is Basic auth safe for production?

Only over HTTPS, and ideally just for internal tools or testing. For user-facing or long-lived access, prefer bearer tokens, API keys or OAuth 2.0 that can be scoped and revoked.

Why is HTTPS so important here?

The credential is sent on every single request. Over plain HTTP it travels in effectively clear text and can be captured by any proxy or network observer.

Does my username or password leave the browser?

No. The header is encoded locally and your credentials are never uploaded.

Keep exploring

More tools you'll like

Hand-picked utilities that pair well with the one you're on — all free, client-side, and zero-signup.