Basic Auth Header Generator
Create an HTTP Basic Authorization header from a user name and password, get the matching curl option, or decode a Basic header you have.
How to make a Basic auth header
Enter the user name and password
They are combined and encoded.
Copy the header
Use the whole line or just the value.
Decode one if you need to
Paste an Authorization header in the box.
Worked example
This is what Basic Auth Header Generator gives for its own sample values. Open the tool above and change anything to try your own.
Authorization header to decode (optional)
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
- User name
- Aladdin
- Password
- open sesame
Result
- Authorization header
- Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
- Just the value
- Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
- curl option
- -u 'Aladdin:open sesame'
- Decoded from the box above
- Aladdin:open sesame
About Basic Auth Header Generator
Create an HTTP Basic Authorization header from a user name and password, get the matching curl option, or decode a header to see the credentials. Basic auth is only Base64, so it is safe only over HTTPS.
FAQs
Is Basic auth secure?
Not by itself. Anyone who sees the header can read the password, so use it over HTTPS only.
Can the password contain a colon?
Yes. Only the first colon separates the user from the password.
Can I make a password file instead?
Use htpasswd Generator.