BYTETOOLS

Basic Auth Header Generator

Generate an HTTP Basic Authorization header from a username and password, and decode a Basic header back to credentials. Free, instant and private in your browser.

Authorization header

Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l

Raw Base64 credentials

YWxhZGRpbjpvcGVuc2VzYW1l

Base64 is encoding, not encryption — Basic authentication only protects credentials when sent over HTTPS. Everything here runs locally in your browser.

What is the Basic Auth Header Generator?

The ByteTools Basic Auth Header Generator turns a username and password into the HTTP header that APIs expect: Authorization: Basic followed by the base64 of user:password.

  • Builds a full Authorization: Basic header
  • Also outputs the raw base64 credentials
  • Decodes a Basic header back to username and password
  • UTF-8 encoding for non-ASCII credentials
  • One-click copy of the header or base64 value
  • 100% client-side — credentials never leave your browser

How to use the Basic Auth Header Generator

  1. 1

    Choose Encode to build a header, or Decode to read one.

  2. 2

    In Encode mode, enter the username and password.

  3. 3

    Copy the ready-made Authorization header or the raw base64 value.

  4. 4

    In Decode mode, paste a Basic header or base64 string.

  5. 5

    Read the recovered username and password.

About the Basic Auth Header Generator

The ByteTools Basic Auth Header Generator turns a username and password into the HTTP header that APIs expect: Authorization: Basic followed by the base64 of user:password. It also gives you the raw base64 value on its own, ready to drop into a client or test script.

Switch to decode mode to reverse the process — paste a full Authorization header or just the base64 value and the tool splits it back into the original username and password, so you can verify what a header actually contains.

Encoding uses UTF-8 so non-ASCII credentials work correctly, and everything runs locally in your browser. Your credentials are never uploaded, making this a safe way to prepare or inspect Basic auth headers during development and testing.

Frequently asked questions

What is HTTP Basic authentication?

Basic authentication sends credentials in an HTTP header formatted as Authorization: Basic <base64>, where the base64 encodes username:password. The server decodes it to check the credentials. It is simple and widely supported by APIs and tools.

How do I create a Basic auth header?

Enter your username and password in encode mode. The tool joins them with a colon, base64-encodes the result, and produces the full Authorization: Basic header along with the raw base64 value for you to copy.

Is Basic auth secure?

Base64 is encoding, not encryption, so a Basic auth header can be trivially decoded by anyone who intercepts it. It is only safe over HTTPS, which encrypts the whole request in transit. Never send Basic credentials over plain HTTP.

How do I decode a Basic auth header?

Switch to decode mode and paste the header or just its base64 part. The tool base64-decodes the value and splits it at the first colon, returning the original username and password so you can confirm what was sent.

What if my password contains a colon?

Only the first colon separates the username from the password, so a password containing further colons is preserved intact. The username, however, cannot contain a colon in Basic authentication.

Are my credentials uploaded?

No. Both encoding and decoding run entirely in your browser, so the username and password you enter are never transmitted to any server.

Guides for Basic Auth Header Generator

Related tools