Basic Auth generator

Generate an HTTP Basic Authorization header by encoding a username and password as Base64 for API testing and development.

Credentials

Enter the username and password to encode.

Authorization header

Copy this value into an Authorization request header.

Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

cURL example

Use this command as a starting point and replace the example URL.

curl -H "Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" https://api.example.com/protected

What is basic auth?

Basic Auth puts username:password into the Authorization header after Base64 encoding it. It is simple and widely supported, but Base64 is only an encoding step, not encryption.

What this tool generates

  • An Authorization: Basic ... value you can paste into API clients.
  • A ready-to-run curl example for quick testing.

What to keep in mind

  • Use HTTPS whenever you send Basic Auth credentials.
  • Anyone who sees the header can decode the original username and password.
  • Basic Auth is convenient for internal tools, staging environments, and quick API checks.

How to use

Enter a username and password. The Basic Authorization value and cURL example update automatically. Copy either result when ready. Basic Auth is Base64 encoding, not encryption, so use HTTPS when sending credentials.