Basic Auth header generator

Username and password as an HTTP Authorization header, UTF-8 encoded as RFC 7617 specifies, and the reverse operation.

HTTP header

Send with onlyU — Your recipient gets a link they can open only once, then the link is gone. onlyU opens in a new tab with the secret already filled in: all you have to do is create the link. Free, no sign-up. How does it work?

curl examples

Decode a header

Paste an Authorization: Basic header to read the username and password it contains. Decoding happens in your browser.

Computed in your browser. Nothing is sent unless you choose onlyU.

The Authorization: Basic header, correctly encoded

HTTP “Basic” authentication sends a username and a password in a header on every request. Building it is simple: join the username and the password with a colon, convert the whole thing to bytes, then encode those bytes in Base64. The example from RFC 7617, with the username “Aladdin” and the password “open sesame”, gives:

Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

The generator does this calculation in your browser, from a username and a password you type or generate. The page is not allowed to make network requests: nothing you type leaves it.

Why UTF-8 matters

As long as the username and password contain only ASCII characters, every encoding gives the same result. As soon as an accented letter or a symbol such as “£” or “€” appears, a choice has to be made, and RFC 7617 designates UTF-8, which the tool always applies. With the username “test” and the password “123£”, the RFC's example gives dGVzdDoxMjPCow==. A Latin-1 encoding would produce different bytes, and the server would reject the login without saying why.

The username cannot contain a colon, since that character separates it from the password; the password, on the other hand, can.

Decode an existing header

The tool also works the other way: paste an Authorization: Basic … header, or just the encoded value, and it shows the username and password it contains. This is handy for checking what a client, a webhook or a monitoring tool sends, or for understanding why authentication fails. Decoding happens in the page, just like encoding.

The curl examples

The tool prepares two commands, ready to copy, that send the same request:

curl -H "Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" https://api.example.com/
curl -u "Aladdin:open sesame" https://api.example.com/

With -u, curl builds the header itself from the characters your terminal passes to it. With accented characters, the -H form, already encoded in UTF-8, avoids encoding surprises from one terminal to another. Either way, the command usually stays in your shell history, along with the secret.

A Basic header is a password

Base64 makes the value unreadable at first glance, but it is not encryption: anyone can decode it in a second, just as this tool does. A Basic header copied into a ticket, a screenshot or a shared configuration file therefore gives away the username and password in plain text. For the same reason, Basic Auth is used only over HTTPS.

To hand these credentials to a colleague or a client, “Send with onlyU” sends the username and password. onlyU encrypts them in your browser and creates a link that opens only once, valid for 24 hours, then disappears. To understand what the header really contains, read our guide Basic Auth: what the header really contains.

Frequently asked questions

Does Basic Auth encrypt the password?

No. Base64 is a simple encoding that anyone can reverse: the header contains the username and password in plain text. Basic Auth should only be used over HTTPS.

Why encode in UTF-8?

RFC 7617 recommends UTF-8 so that accented and non-Latin characters survive. A Latin-1 encoding would turn “é” into a different byte, and authentication would fail without a clear message.

Can a username contain “:”?

No: the colon separates the username from the password. The password, however, can contain colons, since only the first one counts.

How do I use the header with curl?

Either pass the full header with -H "Authorization: Basic …", or let curl encode it with -u username:password. The tool shows both forms.

How do I share these credentials?

Like a password, since that is what they are: “Send with onlyU” delivers them through a one-time link, instead of leaving them in a ticket or an email.