Encode or decode text and files as Base64 or Base64URL. 100 % local processing in your browser: no data is sent to a server.
1
1
Base64 is a way to write binary data as plain ASCII text. Groups of 3 bytes (24 bits) are split into 4 groups of 6 bits, and each group becomes one character from a 64-character alphabet. The result can travel through systems that only accept text, such as email, JSON, XML or a URL.
This tool encodes text or a file to Base64, and decodes Base64 back to text, as you type. The area you edit is the source and the other one shows the result. You can use the standard alphabet or the URL-safe variant, Base64URL.
foobar
Zm9vYmFy
Hello, DTK!
SGVsbG8sIERUSyE=
Hello, DTK!
SGVsbG8sIERUSyE
Hello, DTK! is 11 bytes, so the standard form ends with one = of padding. Base64URL keeps the same data and drops that padding. The accented word café is encoded from its UTF-8 bytes as Y2Fmw6k= .
Base64 looks like a scrambled secret, but the transformation is public and reversible. Most mistakes come from the alphabet, the character encoding, or extra text wrapped around the payload.
Y2Fm6Q==
Y2Fmw6k=
Pj4/
Pj4_
data:text/plain;base64,SGVsbG8=
SGVsbG8=
= padding is restored. Both alphabets are accepted, so a standard value still decodes while Base64URL is selected. + , / and the = padding of RFC 4648. Base64URL uses - and _ and omits the padding. Changing the variant re-encodes from the source. foobar as Zm9vYmFy . = padding, for the protected header and the payload. -----BEGIN and -----END lines. Those lines are not part of the Base64 payload. + and / , and pads with = so the length is a multiple of 4. Base64URL replaces those two characters with - and _ , and this tool omits the padding, which is the form used in URLs and in JSON Web Tokens. = characters may be added in the standard variant so the length is a multiple of 4. They disappear in Base64URL.