Basic Auth Generator
Generate Base64-encoded Basic Authentication headers from username and password credentials.
Basic Auth Generator tool
Example
Input: Username Aladdin, password open sesame
Result: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
The username and password are joined with a colon (Aladdin:open sesame), UTF-8 encoded and Base64-encoded. Base64 is not encryption, so only send this header over HTTPS.
- Enter your username in the username field.
- Enter your password in the password field.
- The Base64-encoded credentials appear straight away.
- Copy the complete Authorization header (Basic followed by the Base64 value).
- Paste the header into your HTTP client, curl command or configuration.
How HTTP Basic Auth Headers Are Built
This tool turns a username and password into an HTTP Basic Authentication header. It joins them with a colon, encodes the result as Base64 and gives you the full line. For example, Aladdin and open sesame become Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==.
Base64 is an encoding, not encryption. Anyone who sees the header can decode it in seconds with the Base64 Encode and Decode tool and read the password. That is why Basic Auth is only safe over HTTPS, where TLS encrypts the whole request. The header is also sent with every request, and browsers remember the login until you close them, with no standard way to log out.
The tool follows RFC 7617. It encodes text as UTF-8, so accented letters and other scripts work. It warns you if the username contains a colon, because servers split the pair at the first colon. The password may contain colons. You get three copy buttons: the raw username:password pair, the Base64 value and the complete header.
Typical uses are testing an API with curl or Postman, setting credentials in a CI job and putting a password on a staging site behind Nginx or Apache. With curl you can skip the header and write curl -u user:pass followed by the URL, and curl builds the same header for you. Encoding happens in your browser, but it is still wise to test with dummy or short-lived credentials. For API access that does not reuse a person's password, issue random keys with the Token Generator.
Sources
Frequently Asked Questions
Related Tools
Base64 Encode and Decode
Encode text to Base64 and decode Base64 strings back to readable text, with full UTF-8 support.
Developer ToolsPassword Generator
Generate strong, secure passwords with customizable length, character types, and multi-word passphrases.
Security and EncryptionJWT Decoder
Decode JSON Web Tokens to inspect header, payload, and signature without needing the secret key.
Developer Tools