Developer Tools
HTTP Basic Auth Header Generator
Create an Authorization: Basic header from a username and password, with the Base64 value and a curl example, or decode an existing header. UTF-8 or ISO-8859-1.
How to use HTTP Basic Auth Header Generator
Enter a username and password to get the Authorization header, the Base64 credentials and a curl command, or switch to decoding and paste a header to recover the username and password. Everything runs locally in your browser.
- Choose an actionPick Generate a header to encode credentials, or Decode an existing header to read one.
- Enter the detailsType the username and password, or paste Authorization: Basic … or just the Base64 part.
- Copy the headerCopy the header, the Base64 credentials or the curl example; keep UTF-8 unless your server needs ISO-8859-1.
How the Basic auth header is built
The username and password are joined with a colon, encoded as UTF-8 bytes and then Base64-encoded, with Basic in front. admin and secret give admin:secret, which encodes to YWRtaW46c2VjcmV0, so the header is Authorization: Basic YWRtaW46c2VjcmV0. A colon is allowed in the password (the sample p@ss:2026 works) but not in the username, because the server splits at the first colon, and the tool stops you if you try. Decoding reverses the steps and rejects Bearer, Digest, Negotiate and NTLM headers, which are different schemes.
Character sets and security
RFC 7617 recommends UTF-8, which handles accented letters and any other script. Some older servers expect ISO-8859-1 instead; that setting covers Western European letters such as é and ö but rejects characters it cannot represent. Base64 is encoding, not encryption: anyone who sees the header can recover the password in seconds, so only send Basic credentials over HTTPS. Because the generator and decoder run in your browser, the credentials you type are not uploaded anywhere.
Accuracy and data handling
Validate the result with your project's own tests and runtime rules before using it in production. The calculation runs in your current browser; the tool code does not send the input to a processing API.
FAQ
Is Basic authentication secure?
Only over HTTPS. The password is merely Base64-encoded, so anyone who intercepts an unencrypted request can read it straight away.
Is curl -u the same as sending the header?
Yes. curl -u user:password builds the same Authorization: Basic header. Writing the header yourself is handy in scripts, API clients or config files that take raw headers.
Why does a password with accents fail?
The server may decode credentials as ISO-8859-1 rather than UTF-8. Try the ISO-8859-1 character set, or check which encoding the server expects.
Are my credentials uploaded?
No. Encoding and decoding happen locally in your browser, and nothing you type into the form is sent to a server.
More Developer Tools
Related toolsSee whether a JWT is valid, expired or not yet valid, and how long is left
Create secure, URL-safe Nano IDs with your own length, prefix and alphabet
Create time-sortable ULIDs in bulk, for now or for a chosen time
Sign test JWTs with HS256, HS384 or HS512 and automatic iat and exp
Run XPath queries on XML or HTML and list every matching node
Preview the next runs of a cron expression with a plain-English summary