Base64 Encoder / Decoder
Encode and decode Base64 with full UTF-8 support
About this tool
This Base64 tool encodes text into Base64 and decodes Base64 back into text, entirely in your browser. Base64 represents arbitrary binary data using only 64 printable ASCII characters, so it can travel safely through systems built for text such as email, JSON, and URLs. Developers use it for data URIs, embedding images, Basic authentication headers, and JWT tokens. The encoder is UTF-8 aware, so accented letters, emoji, and non-Latin scripts round-trip correctly.
How to use
- 1 Pick Encode to convert text to Base64, or Decode to read Base64 back.
- 2 Type or paste your text into the input box.
- 3 The converted result appears instantly below the input.
- 4 Press the copy button to copy the result, or Swap to flip the direction.
How it works
Base64 splits the input bytes into groups of 6 bits. Because 6 bits encode 64 values, each group maps to one character from the alphabet A-Z, a-z, 0-9, plus + and / (64 characters in total). Three bytes (24 bits) become four Base64 characters, so the output is about one third larger than the input. When the byte count is not a multiple of three, one or two = signs are added as padding. Decoding reverses the process. Text is first turned into UTF-8 bytes, which is why "Hello" becomes SGVsbG8= and why multi-byte characters are preserved exactly.
Frequently asked questions
Is Base64 encryption?
No. Base64 is reversible encoding, not encryption. Anyone can decode it, so never use it to protect secrets; use real cryptography for that.
Why does "Hello" become SGVsbG8=?
The five bytes of "Hello" are regrouped into 6-bit chunks, mapped to Base64 characters, and padded with one = because five bytes is not a multiple of three.
Why is the output longer than the input?
Base64 turns every 3 bytes into 4 characters, increasing size by roughly 33%. That overhead is the price of making binary data text-safe.
Does it handle emoji and non-English text?
Yes. The input is encoded as UTF-8 first, so emoji, accents, and scripts like Japanese or Arabic encode and decode without corruption.
Related tools and uses
For escaping text inside web addresses, use the URL encoder. To inspect character code points use the ASCII / Unicode converter, and for raw bit and hex values see the number base converter.