Base64 Encode and Decode
Convert text to Base64 and back. Full UTF-8 support, so accented characters, emoji and non-Latin scripts survive the round trip intact.
What Base64 is for
Base64 turns arbitrary bytes into a string of 64 safe characters
(A–Z, a–z, 0–9, + and
/, with = as padding). The point is transport, not
storage: it lets binary data travel through channels that only reliably carry
plain text — email bodies, JSON string fields, URLs, HTTP headers, HTML
attributes.
The cost is size. Base64 encodes three bytes as four characters, so the output is about 33% larger than the input. That is fine for a small icon inlined in a stylesheet and a poor idea for a large file.
The UTF-8 trap
Many browser-based Base64 tools call btoa() directly, which only
accepts characters in the Latin-1 range. Feed it an accented letter, an emoji, or
any non-Latin script and it throws an error — or worse, silently mangles the
text. This is why so many quick Base64 tools fail on the word
città.
This tool encodes your text to UTF-8 bytes first and Base64-encodes those bytes, then reverses the process exactly on decode. Accents, CJK characters, Cyrillic, Arabic, and emoji all round-trip without loss.
Base64 is not encryption
This matters enough to state plainly: Base64 provides no security whatsoever. It is a reversible encoding with no key, and anyone can decode it in one step — including on this page. Encoding a password, an API token or personal data in Base64 does not protect it; it only makes it slightly less readable at a glance. If you need confidentiality, you need actual encryption.
Related but different: base64url replaces
+ and / with - and _ so the
result is safe inside a URL. It is what JSON Web Tokens use. Standard Base64
decoded here will handle the character set it is given, but if you are working
with JWTs, be aware the segments use the URL-safe variant.
Common situations
- Reading the payload of a JWT to see what claims it carries.
- Inlining a small image or font in a
data:URL. - Decoding an HTTP Basic authentication header to check which user it names.
- Moving a small configuration blob through a form field that strips newlines.
Frequently asked questions
Does this handle accented characters and emoji?
Yes. Text is converted to UTF-8 bytes before encoding and decoded back the same way, so accents, emoji and non-Latin scripts round-trip without loss — unlike tools that call the browser's btoa() directly.
Is Base64 a form of encryption?
No. It is a reversible encoding with no key, and anyone can decode it instantly. It offers no confidentiality at all — never use it to protect passwords, tokens or personal data.
Why does my Base64 string fail to decode?
Usually the string has been truncated, has had line breaks or spaces introduced, or is missing its = padding. It may also be the URL-safe variant, which uses - and _ instead of + and /.
Can I encode a file?
This tool works on text. Drag a text file onto the input box and it will load, but binary files such as images need a dedicated file-to-Base64 converter.