Basic Auth Header Generator
Turn a username and password into an HTTP Basic Authorization header. Computed in your browser — credentials never leave your device.
Basic Auth header generator
Turn a username and password into an HTTP Basic Authorization header. The
value is Basic followed by the base64 of username:password (RFC 7617). It's
computed locally in your browser — your credentials are never sent anywhere.
Output
- Default: just the value, e.g.
Basic YWxhZGRpbjpvcGVuc2VzYW1l— drop it into anAuthorizationheader. - Tick full header to get the whole line:
Authorization: Basic …— handy for pasting intocurl -H, a REST client, or docs.
Notes
- The username can't contain a colon (
:) — that's the separator between username and password. The password may be empty. - Base64 is encoding, not encryption — anyone can decode a Basic header, so only use it over HTTPS.
FAQ
Are my credentials uploaded?
No — the header is built in your browser tab with WebAssembly; nothing is sent.
Why can't my username contain a colon?
RFC 7617 encodes the credentials as username:password, so the first colon marks where the username ends. A colon in the username would shift everything after it into the password. Colons in the password are fine — the tool rejects only usernames containing :.
Can the password be empty?
Yes. Leaving the password blank produces base64("username:"), which some APIs use for token-style auth (token as username, empty password). Only the username is required.
What does the "full header" option change?
Off (the default) you get just the value, Basic YWxhZGRpbjpvcGVuc2VzYW1l, ready to assign to an Authorization header in code. On, you get the complete line Authorization: Basic …, which you can paste directly after curl -H or into an HTTP client.
Do special characters like é or ü work?
Yes — the credentials are encoded as UTF-8 before base64, so accented and non-Latin characters round-trip correctly. Just be aware some older servers expect Latin-1 and may reject UTF-8 credentials.
Developer & Automation Access
Run it from the terminal
Same engine as this page, headless — via the gizza CLI:
gizza tool basic-auth-header-generator "aladdin"New to the CLI? Get gizza →
Open it by URL
Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:
https://gizza.ai/tools/basic-auth-header-generator/?username=aladdin&password=opensesame&full_header=trueMachine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
