Base64 encoder and decoder

Encode or decode Base64, standard or url-safe, in UTF-8. The text stays in your browser.

Text is encoded as UTF-8. When decoding, both variants are recognised; binary content is shown in hexadecimal.

Result

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?

Anyone can undo an encoding: it protects nothing. To pass on a decoded credential, “Send with onlyU” delivers it through a link that opens only once.

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

Base64 encode a text

Base64 writes any sequence of bytes with 64 characters that travel safely anywhere: letters, digits, + and /, plus the = sign when padding is needed. Choose Encode and type or paste your text: the result appears as you type. The text is first converted to UTF-8 bytes, the encoding that APIs, HTTP headers and JWTs expect; an accented character takes two bytes, and the result grows accordingly:

Man    → TWFu
café   → Y2Fmw6k=
é      → w6k=

Standard Base64 or Base64url

The standard variant (RFC 4648) uses + and /, and pads the result with = to a multiple of four characters. It is the one used by email attachments, data: URIs and the Basic Auth header.

The Base64url variant replaces + with - and / with _, and drops the padding, so the value fits as is in an address or a file name. It is the one used by JWTs and many API tokens. The same text gives:

???    → Pz8/    (standard)
???    → Pz8_    (Base64url)

Base64 decode a value

In Decode mode, paste the encoded value. The decoder recognises both variants, accepts missing padding and ignores spaces and line breaks: a block wrapped at 76 characters, as found in the source of an email, can be pasted as is. For an Authorization: Basic … header, paste only the value after the word Basic, or use the Basic Auth header generator, which separates the username from the password.

When the decoded bytes form UTF-8 text, the tool displays it. Otherwise the content is binary (an image, a key, compressed data), and the tool shows it as hexadecimal, without mangling it. For example, iVBORw0KGgo=, the start of every Base64-encoded PNG image, decodes to 89504e470d0a1a0a: the signature of the PNG format.

The Use the result as input button takes the result and switches direction. Use it to check that an encoded value decodes back to the original, or to decode a value that was encoded twice.

Decoded text is often a credential

Base64 is made for transport, not protection: the decoded value appears in plain text, here as in any terminal. And what people decode is often sensitive: a password from a configuration file, the value of a Kubernetes Secret, the content of a Basic header. The calculation runs in your browser, and the page is not allowed to make network requests.

To hand the result to a colleague, “Send with onlyU” passes it to onlyU from one tab to another in your browser, never in an address and never through the kit's server. onlyU encrypts it in your browser and creates a link that opens only once, valid for 24 hours, then disappears. To understand what Base64 really does, read our guide Base64 is not encryption.

Frequently asked questions

Does Base64 protect a password?

No: anyone can decode it in a second, with this tool or on the command line. Base64 carries bytes inside text; it does not hide them.

What is the difference between Base64 and Base64url?

Base64url replaces + and / with - and _, and often drops the = padding, so it fits in a URL or a file name without escaping. It is the variant used by JWTs.

Why is the decoded result shown in hexadecimal?

Because the decoded bytes are not valid UTF-8 text: the content is binary (an image, a key, compressed data). Hexadecimal shows it without mangling it.

Why does the size increase?

Base64 writes 3 bytes as 4 characters: the result is about a third longer than the original data.

Is the text sent anywhere?

No, encoding happens in your browser. If the decoded text is a credential, “Send with onlyU” delivers it through a link that opens only once.