What this tool does
Basic Auth Generator converts username:password into bytes according to UTF-8 and then performs Base64 encoding to avoid errors caused by direct btoa Unicode. Basic is only reversible encoding rather than encryption, and must be used with HTTPS for actual use.
- Shows both Base64 Credentials and the full Authorization Header.
- The username and password are not written to localStorage, included in the URL, or sent to the server.
- Clicking "Clear" will remove the username, password, and all derivatives.
How to use it
- Enter Username and Password.
- Click Generate Basic Auth.
- Check Base64 Credentials or full Header.
- Click "Clear" after copying the results.
Common uses
- Prepare Basic Authorization Header for local API testing.
- Validate UTF-8 Base64 results for multilingual usernames.
- Learn the actual string format for Basic Auth.
Privacy and security
The username and password are only used for UTF-8 Base64 encoding within the current page and will not be saved or sent; Basic Auth must work with HTTPS.
Basic Auth Generator Features
Generate Basic Authorization Header securely in UTF-8, with the caveat that Base64 is not encryption. Useful for everyday development and debugging; results can be reviewed, copied, or downloaded immediately.
FAQ
Is Basic Auth encryption?
No. Base64 can easily restore usernames and passwords, and must rely on HTTPS for transmission.
Does it support Chinese username or password?
Support. The tool uses UTF-8 bytes first and then Base64 encodes them.
Will the credentials be saved or uploaded?
No, localStorage is not used and no network requests are made.
Why should I empty it after use?
Credentials and derived headers are sensitive information, and clearing them can reduce the time they remain on the current page.