Basic Auth Generator
Free online Basic Auth generator, no installation required. Generate HTTP Basic Auth headers
About Basic Auth Generator
Generates an HTTP Basic Authentication header from a username and password. It base64-encodes the 'username:password' pair using btoa and outputs three ready-to-paste forms: the raw Base64 token, the full Authorization header, and a sample curl command.
How to Use
1. Type the Username (e.g. admin). 2. Type the Password (masked input). 3. As you type, the Base64 token, 'Authorization: Basic ...' header, and a curl example update live. 4. Click Copy next to whichever form you need.
Output Formats & Limitations
Three outputs are produced: Base64 token only, full 'Authorization: Basic <token>' header line, and 'curl -H "Authorization: Basic <token>" https://example.com/api' example command. Encoding uses btoa, which only handles Latin-1 characters correctly; usernames or passwords containing non-Latin-1 characters (e.g. CJK, emoji) will produce incorrect or throwing output.
▶Why does the tool throw or produce garbage for non-ASCII passwords?
▶Is Basic Auth secure?
▶Where are my credentials stored?
▶Why is the curl example hardcoded to https://example.com/api?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee