Base64 Encoder

Encode and decode text in your browser, including the URL-safe alphabet.

UTF-8 text stays in this browser. URL-safe swaps + and / for - and _ and drops the padding.

How to encode and decode Base64

1. Paste the text and choose Encode. The result is Base64, not a hash.

2. Paste a Base64 value and choose Decode to get the text back.

3. Turn on URL-safe when the value uses - and _ instead of + and /.

What Base64 encoding is

Base64 encoding turns any bytes into letters, numbers, plus, and slash. The result is longer than the original, and it is not a hash: anyone can decode it. Use it when a channel only accepts plain text, such as a data field, a token, or a certificate.

Base64 encode and Base64 decode

Encode takes the text and writes the Base64 form. Decode takes that form and writes the text back. A space in the middle, a missing character, or the wrong alphabet makes the decode fail. This page uses UTF-8, so letters outside English survive a round trip.

URL-safe Base64

Standard Base64 uses + and /, which need escaping in a URL. URL-safe Base64 swaps those for - and _ and drops the = padding. Turn the switch on only when the value you were given already uses that alphabet.

More free tools

Keep going

Open another tool. No account, and no install.

Security

Code

Text