How to use the Basic Auth Decode tool
- Paste the header value, such as Basic YWxpY2U6c2FtcGxl, into the Basic authentication header box. The bare token without the word Basic also works.
- Select Convert, or select Example to decode the sample credentials.
- Read the two lines in the Result box: Username and Password.
- Select Copy if you need the decoded pair, then select Clear so the password does not stay on screen.
How a Basic authentication header is built
RFC 7617 defines the Basic scheme. The client joins the user id and the password with a single colon, encodes the resulting bytes with Base64, and sends the outcome after the word Basic in the Authorization header. Running curl with -u user:pass, for instance, sends Authorization: Basic dXNlcjpwYXNz.
Decoding walks the same path backward. This tool trims the input, removes a leading Basic (in any letter case) and the whitespace after it, decodes the Base64, reads the bytes as UTF-8 and splits the text at the first colon.
Basic Auth decoder examples
The first two entries are the Example value and the sample from RFC 7617. The third shows the first-colon rule: the user id cannot contain a colon, so everything after the first one, further colons included, is the password. The fourth is a pattern used by many payment and SaaS APIs, where the key is the username and the password is empty.
Basic YWxpY2U6c2FtcGxl Username: alice
Password: sample
Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== Username: Aladdin
Password: open sesame
Basic YWxpY2U6cGE6c3M6d29yZA== Username: alice
Password: pa:ss:word
Basic YXBpX2tleV8xMjM6 Username: api_key_123
Password:What the decoder accepts and rejects
The input rules are narrow on purpose, so an unexpected value produces an error instead of a misleading split.
- Accepted: the header value with its scheme, that is the word Basic, whitespace and the token.
- Accepted: the token alone, in standard Base64 or Base64URL, with or without padding.
- Rejected: the full header line. Remove the Authorization: name first, because the colon and the extra word are not Base64.
- Rejected: other schemes such as Bearer or Digest. They do not use the user:password format.
- Rejected: a token whose decoded text has no colon. The tool reports that a username and password separated by a colon are required.
- Rejected: credentials that are not valid UTF-8, for example accented passwords sent in ISO-8859-1 by older clients.
Basic authentication is encoding, not encryption
Anyone who can read the header can read the password, as this page demonstrates. Base64 uses no key. The scheme is only as safe as the transport underneath, which is why RFC 7617 says it should be used together with a secure channel such as TLS. Treat a header found in a log file, a HAR export or a shared curl command as a leaked password and rotate it.
The same format appears in the Proxy-Authorization header and in the auth field of container registry configuration files. Both decode here once you isolate the token.
Frequently asked questions
Is it safe to paste a real Authorization header here?
The header is decoded by JavaScript in your browser and is not transmitted. Still, the password appears in clear text in the Result box, so mind screen sharing and clear the form afterward.
Why does the tool say Enter valid Base64 or Base64URL data?
Something other than the scheme and token was pasted. The usual causes are the Authorization: header name, surrounding quotes from a curl command, or a Bearer token. Reduce the input to Basic plus the token, or the token alone.
Can a Basic Auth password contain a colon?
Yes. Only the first colon separates the two parts. The user id may not contain one, but the password may contain any number of them, and the decoder keeps them all.
What if the password line is empty?
Then the decoded text ended right after the colon. Many APIs use this form: the API key travels as the username and the password is left blank.
Does it handle non-English characters?
Yes, when the client encoded them as UTF-8, which RFC 7617 supports through its charset parameter. The RFC's own example, dGVzdDoxMjPCow==, decodes to user test with a password ending in a pound sign.
How do I create a Basic Auth header?
Use the Basic Auth encoder on this site. Enter a username without colons and a password, and it returns the complete value starting with Basic.