Base64 Encoder / Decoder

Convert text to Base64 or back, with UTF-8 and URL-safe support. Nothing leaves your browser.

How Base64 encoding works

Base64 writes every 3 bytes of data as 4 text characters from a 64-character alphabet (A-Z, a-z, 0-9, + and /), padding the end with = when needed. The output is about 33 percent larger than the input.

Pick Encode or Decode, then type or paste. The result updates as you type. Turn on URL-safe to use - and _ and skip the padding. To encode a file, choose it and copy the resulting data URL.

Frequently Asked Questions

Does this support emoji and non-English text?
Yes. Text is converted to UTF-8 bytes before encoding and decoded as UTF-8 afterwards, so accented letters, emoji and other scripts round-trip correctly.
What is URL-safe Base64?
It replaces + with - and / with _ and drops the = padding, so the result can sit in a URL or filename without escaping. The decoder accepts both the standard and the URL-safe form.
Why do I get an invalid Base64 error?
The input has characters outside the Base64 alphabet, or its length cannot be valid. Check for stray characters or a truncated string. Spaces and line breaks are ignored.
Is Base64 a form of encryption?
No. Anyone can decode it. Base64 only makes binary data safe to carry as text. Do not use it to hide passwords or secrets.
Is my data uploaded?
No. Encoding and decoding run in your browser, and files chosen for the data URL option are read locally and never sent anywhere.

TechBasket Tools

Published