What the header actually looks like
HTTP Basic authentication follows RFC 7617: join username and password with a colon, Base64-encode the result, prefix it with Basic and a space, and put it in the Authorization header. For admin and password the string admin:password encodes to YWRtaW46cGFzc3dvcmQ=, giving Authorization: Basic YWRtaW46cGFzc3dvcmQ=. Base64 is encoding, not encryption, so anyone holding the string reads the password instantly — this is the first fact to internalize.
Steps
- Enter the username as the real account, with no spaces.
- Enter the password and use Show to toggle visibility so you can confirm it.
- Enter the request URL the header is for, such as https://api.example.com/data. It only feeds the curl sample.
- Click Generate for the full Authorization line plus a runnable curl command.
- Download saves the result; Example shows the standard case and Clear resets.
Why HTTPS is mandatory
Basic auth puts the password, only encoded, into a header. Over plain HTTP anyone who can sniff the path — a neighbour on the same Wi-Fi, the carrier at the router, a proxy — reads the credentials directly. Under HTTPS the header travels inside TLS, so an interceptor sees ciphertext. Use this header only against https URLs; if a service supports http only, fix the service or change the auth scheme instead of sending it anyway.
The Chinese and emoji trap
Base64 encodes bytes, not characters. Chinese occupies three bytes per glyph in UTF-8 and two in GBK, producing entirely different Base64. Whatever the server decodes with, you must encode with. This tool assumes UTF-8, matching most modern servers; a legacy system rejecting valid credentials usually has a mismatch. Emoji are four-byte characters, and some old servers truncate them so auth always returns 401 — keep credentials ASCII.
Where not to use it
Do not use Basic for public user login. There is no logout, so the browser keeps sending credentials; it resists no replay, so one capture works forever; and it offers no second factor. It suits internal API protection, CI scripts, temporary debugging and gating a static site with Nginx auth_basic. Real product login belongs to OAuth, JWT or session cookies with CSRF protection.