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.