Basic encoding
Authorization = 'Basic ' + Base64(UTF-8(username + ':' + password))
Encode a username and password as UTF-8 then Base64 to get the HTTP Authorization: Basic header, with ready-to-paste curl and fetch examples, or paste an existing Basic header to recover the username and password.
Base64 is not encryption: anyone can decode these credentials. Only send the Basic header over HTTPS.
This tool builds the HTTP `Authorization: Basic …` header from a username and password, and also works the other way round: it decodes a Basic header to show the credentials inside. It is for developers testing an API, a webhook or an .htpasswd-protected directory, and for anyone debugging a request rejected with 401.
The Basic scheme is defined in RFC 7617: the client joins the username, a colon and the password, encodes that string as UTF-8 bytes, then as Base64. The RFC example, `Aladdin:open sesame`, gives `QWxhZGRpbjpvcGVuIHNlc2FtZQ==`, i.e. the header `Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==`. The tool applies exactly this method and also provides a curl command and a fetch call that send the header.
Decoding goes the other way: the tool accepts the full header or just the Base64 value, decodes it as UTF-8 and splits the username from the password at the first colon. This shows that Base64 is not encryption: anyone who intercepts the header reads the password in clear. Basic auth must therefore only travel over HTTPS, and the server should store a password hash (bcrypt in .htpasswd, for example), never the Base64 value.
Type the username and password: the tool produces the Base64 value and the matching Authorization: Basic header.
Take the header alone, the curl command or the fetch call, ready to paste into your terminal, code or API client.
Paste an existing `Authorization: Basic …` header, or just its Base64 part, to display the username and password it contains.
Authorization = 'Basic ' + Base64(UTF-8(username + ':' + password))
Generate the header or curl command for an API that expects Basic auth, such as the Jira Cloud API with an email address and an API token.
Decode the Authorization header your client sends to check that the username, password and separator are what the server expects.
Many services ask for the full Authorization header value to call a protected endpoint: generate it without a script or terminal.
Input
Operation: Generate; Username: Aladdin; Password: open sesameResult
Base64 credentials: QWxhZGRpbjpvcGVuIHNlc2FtZQ==; Authorization header: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==It offers no confidentiality on its own: Base64 decodes instantly and the header is sent with every request. Over HTTPS the transport is encrypted and Basic is acceptable for an internal API, a staging site or an admin tool. For a public application, prefer tokens (OAuth 2.0, revocable API keys) and rate limiting.
Strip the "Basic" prefix, Base64-decode the value and read the resulting UTF-8 text: everything before the first colon is the username, the rest is the password. The tool does this automatically when you paste the header or its value.
Yes. RFC 7617 lets the server announce charset="UTF-8", and the tool always encodes as UTF-8, which handles accented characters and emoji. A colon is allowed in the password but not in the username.
Basic sends the username and password themselves, Base64-encoded. Bearer sends an opaque token or a JWT issued by an authorization server, which can expire or be revoked without changing the password. Both use the Authorization header and both require HTTPS.
There is no standard logout: the browser keeps the credentials in memory and resends them for the whole session. Fully closing the browser, using a private window or triggering a new 401 response are the only practical options.
No. The server-side .htpasswd file stores a password hash (bcrypt or APR1-MD5), whereas the client-side Basic header carries the plain password encoded in Base64. This tool produces the header the client sends, not the .htpasswd entry.
Related tools
Tools similar or complementary to this one.
Encode text as Base64 or decode a Base64 string back to its original content.
Generate a complete cURL command from an HTTP request.
Build custom HTTP headers and get output ready to use in your requests.
Understand the layers that protect a website: HTTPS, HTTP security headers, CSP, SRI, authentication, passwords and integrity.
Understand HSTS, CSP, X-Content-Type-Options, Referrer-Policy and Permissions-Policy and how to verify the headers actually returned.
Understand how OAuth 2.0, PKCE, JWT, JWK and JWKS fit together: authorization, tokens, public keys and verification.
Distinguish hashing from encryption and encoding, understand SHA-256 and SHA-3, collisions and the limits of a hash without authentication.