Base64 encoder and decoder (UTF-8 safe)
Convert text to Base64 or read a Base64 string as UTF-8 text. Accents and emoji are supported, with options for URL-safe output, padding and line wrapping.
Runs in your browser — your input is not uploaded to ToolsNow.
How to use
- Choose Encode or Decode. Encode starts with plain text. Decode starts with the Base64 characters, without a data-URI prefix such as "data:text/plain;base64,".
- Match the format you need. When encoding, use URL-safe (- and _) if required. Keep = padding and Wrap at 76 chars (MIME) should match the system receiving the result.
- Check and copy. Decoding accepts both Base64 variants and ignores whitespace. Use Copy result when the output is what you expected.
Questions
Can I encode accents and emoji?
Yes. The text is converted to UTF-8 bytes first. For example, "é" encodes as w6k= and decodes back to "é". This differs from calling btoa() directly on a JavaScript string.
Why does decoded output contain � or unreadable characters?
The bytes may be a file, compressed data or text in an encoding other than UTF-8. This decoder displays bytes as UTF-8 text and replaces invalid sequences with �. It does not recover a binary file or decompress it.
What changes in URL-safe Base64?
It uses - instead of + and _ instead of /. Many systems also omit the ending = padding. The decoder accepts either alphabet and restores missing padding where possible; use the variant your API or format specifies.
Is Base64 encryption?
No. Anyone with the encoded text can decode it without a key. Use it to represent bytes as text, not to protect a password or hide personal information.
Why is the output longer?
Each group of three input bytes becomes four Base64 characters, with padding for an incomplete group. The comparison is by bytes, not visible letters: an emoji takes several UTF-8 bytes before it is encoded.
Published by ToolsNow. How tools and sources are checked · Report a problem