Base64 Encode for HTTP Basic Auth Headers
Quick Answer: Enter credentials as username:password and get the Base64-encoded string for HTTP Basic Auth. Use it in the header: Authorization: Basic dXNlcjpwYXNz. Remember that Basic Auth is only secure over HTTPS.
FAQ
What is the format for Basic Auth?
Combine username and password with a colon (user:pass), Base64 encode it, and send as: Authorization: Basic [encoded_value].
How do I use Basic Auth with curl?
Use curl -u username:password or curl -H "Authorization: Basic $(echo -n user:pass | base64)". Curl handles encoding with -u.