Skip to content

Basic Auth Decoder

Decode an HTTP Basic Authentication header to reveal the username and password inside it.

Runs in your browser Free, no sign-up
Loading tool workspace...

What is Basic Auth Decode?

This Basic Auth decoder reveals the username and password inside an HTTP Basic Authentication header. Basic authentication sends credentials as Authorization: Basic followed by Base64 of username:password, for example Basic dXNlcjpwYXNzd29yZA== for user and password.

Paste the whole header line, the value starting with Basic, or just the Base64 part, and the tool decodes it and splits it into username and password. It is useful for checking which credentials a client is sending, debugging 401 errors, and confirming that a configured header is correct.

How to use Basic Auth Decode

  1. Paste the Authorization header, such as Authorization: Basic dXNlcjpwYXNzd29yZA==, or just the Base64 value.
  2. The username and password appear immediately.
  3. Compare them with the credentials the server expects.
  4. Copy either value if you need it.

Key features

  • Accepts the full header line, the Basic value or raw Base64
  • Splits the result into username and password
  • Handles passwords that contain colons
  • Clear error for malformed headers
  • Decoded locally; credentials are never uploaded

Common use cases

  • Debugging 401 Unauthorized responses from APIs
  • Checking credentials configured in a reverse proxy or CI pipeline
  • Verifying Authorization headers captured in browser developer tools
  • Auditing logs that accidentally recorded Basic credentials
  • Explaining how Basic authentication works

Technical details & standards

Basic authentication is defined in RFC 7617. The client joins the username and password with a colon, encodes the result as UTF-8 and then Base64, and sends it as Authorization: Basic <value>. Decoding reverses those steps and splits at the first colon, so a password may itself contain colons, but a username may not.

Because Base64 is not encryption, Basic credentials are readable by anyone who sees the header, which is why Basic authentication must only be used over HTTPS. Decoding happens in your browser and nothing is sent anywhere, but treat real credentials with care in any tool.

Frequently asked questions

How does HTTP Basic authentication work?

The client sends Authorization: Basic followed by Base64 of username:password with each request. The server decodes it and checks the credentials, replying 401 Unauthorized with a WWW-Authenticate header when they are missing or wrong.

Is Basic authentication secure?

Only over HTTPS. Base64 is trivially reversible, so on plain HTTP anyone who can see the traffic can read the password. Even over HTTPS, token-based schemes are usually preferred for APIs.

How do I create a Basic auth header?

Base64-encode username:password and prefix it with Basic. In a shell: echo -n 'user:password' | base64, or let curl do it with curl -u user:password https://example.com.

Can a password contain a colon?

Yes. The value is split at the first colon, so everything after it is the password. The username cannot contain a colon.

Is my data safe?

Processing happens locally in your browser. Tool input is not sent to CodeUnpack servers.

Does it work offline?

Once the page has loaded, this tool can process input without an internet connection.

More encoders & decoders tools

View all