Skip to content
Categories
Basic Auth Header Generator
Generate an HTTP Basic Authentication Authorization header from a username and password.
Overview
- Generates an HTTP Basic Authentication Authorization header by joining a username and password as "username:password" and Base64-encoding the result.
- The generated header can be used as-is with curl or an API client when testing a request that requires Basic authentication.
- The encoding happens entirely in your browser, and the values you enter are never sent anywhere.
Usage
- Enter the username and password.
- Click the "Generate" button.
- The Authorization header in the form "Basic ..." is displayed.
Example
Input
Username: Aladdin Password: open sesame
Output
Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Use Cases
- Preparing the header value to test an API that requires Basic authentication, using curl or Postman
- Checking whether a server-side Basic authentication implementation correctly validates the header
- Creating an Authorization header for simple access restriction in a development environment
FAQ
Is the generated header encrypted?
No. Base64 encoding is not encryption and can be easily decoded by anyone. Always use it together with HTTPS.
Can the username contain a colon (:)?
No. The colon is used as the separator between the username and password, so it cannot appear in the username.
Are the username and password I enter saved anywhere?
No. The input values and the encoded result exist only on the page and are never sent or saved externally.
Notes
- Basic authentication only Base64-encodes the credentials without encrypting them, so using it over plain HTTP risks exposing them to third parties.
- The header can be generated even with an empty password, but set an appropriate value based on your actual authentication requirements.
Related Tools
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hash values from text.
Generate a JWT from a header, payload, and secret.