Developer ToolsA little help for every day

Search by name or task, such as JSON or percentage.

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.

View all tools
ResultUpdates as you type
HeaderAuthorization: Basic YWRtaW46cEBzczoyMDI2
Base64 credentialsYWRtaW46cEBzczoyMDI2
curl example
curl -H "Authorization: Basic YWRtaW46cEBzczoyMDI2" https://example.com/

Base64 is encoding, not encryption: anyone can recover the password, so only use it over HTTPS. Everything runs locally in your browser.

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.

  1. Choose an actionPick Generate a header to encode credentials, or Decode an existing header to read one.
  2. Enter the detailsType the username and password, or paste Authorization: Basic … or just the Base64 part.
  3. 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.

Often Used Together

Next step

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 tools