HTTP Basic Auth Header Generator

Generate an HTTP Basic Authorization header by Base64-encoding username:password. Build the header for curl, fetch and Postman.

Part of the free Base64 Encoder. Runs in your browser — nothing is uploaded.

HTTP Basic Auth Header Generator

HTTP Basic authentication sends "username:password" encoded in Base64 inside the Authorization header. Encode your pair below and prepend "Basic " to get a header you can use in curl, fetch or an API client.

Worked example: Credentials to Authorization header

username:password

demo-user:demo-pass

Header

Authorization: Basic ZGVtby11c2VyOmRlbW8tcGFzcw==

Practical tip

Base64 is not encryption. Only send Basic auth over HTTPS, and prefer tokens or OAuth for anything beyond internal tools.

How to use this Base64 Encoder

  1. 1Use the live tool above — it runs entirely in your browser and never uploads your data.
  2. 2Paste the sample from the worked example, or use your own input.
  3. 3Copy the result, then adapt the same steps in your editor, script, or pipeline.

HTTP Basic Auth Header Generator FAQs

Is Basic auth secure?

Only over HTTPS. The credentials are merely Base64 encoded, so anyone who intercepts them over plain HTTP can read them instantly.

What if the password contains a colon?

It is fine. The username cannot contain a colon, but everything after the first colon is treated as the password.

More Base64 Encoder pages

Open the full Base64 Encoder tool →