Encode text to Base64 or decode Base64 to text
Text (0 chars) → Base64 (0 chars)
This Base64 Encoder converts text and binary data to and from Base64 directly in your browser. It handles full UTF-8 input, so accented characters, emoji, and non-Latin scripts (Cyrillic, CJK, Arabic) round-trip correctly instead of turning into mojibake or throwing errors.
It is aimed at developers who need to embed data in JSON payloads, HTTP headers, data URIs, email MIME parts, or config files where raw binary is not allowed. Paste a string to encode, or paste a Base64 blob to decode it back to readable text, and copy the result in one click.
Base64 represents binary data using 64 printable ASCII characters: A-Z, a-z, 0-9, plus (+), and slash (/). It reads the input three bytes (24 bits) at a time and splits those 24 bits into four 6-bit groups, mapping each group to one character. Because 2 to the 6th power is 64, every 6-bit group has exactly one character. This is why Base64 grows the data by roughly one third: 3 bytes of input become 4 characters of output.
When the input length is not a multiple of three, the encoder pads the final group with one or two = characters so the output length is always a multiple of four. For UTF-8 support, this tool first encodes each character to its UTF-8 byte sequence before applying Base64, which is why a multi-byte character like an emoji produces more Base64 output than a single ASCII letter.
A common variant is URL-safe Base64 (RFC 4648), which replaces + with - and / with _ so the string can travel in URLs and filenames without percent-encoding. JSON Web Tokens use this variant. Note that Base64 is an encoding, not encryption. It provides no security or confidentiality; anyone can decode it trivially.
Yes, it is completely free. All encoding and decoding runs locally in your browser using JavaScript, so your input is never uploaded to a server. You can even use it offline once the page has loaded.
Yes. The tool encodes input as UTF-8 before applying Base64, so emoji, accented letters, and scripts like Chinese, Japanese, Arabic, and Cyrillic encode and decode without corruption.
Base64 turns every 3 bytes into 4 characters, so the output is about 33 percent larger than the input. Multi-byte UTF-8 characters add even more, since a single visible character may be several bytes before encoding.
They are padding. Because Base64 output length must be a multiple of four, one or two = characters are appended when the input byte count is not divisible by three. They carry no data and are safe to keep.
Yes. The decoder accepts the URL-safe alphabet that uses - and _ in place of + and /, converting them before decoding. Note that a full JWT has three dot-separated parts; decode each part separately, or use a dedicated JWT decoder.
No. Base64 is a reversible encoding designed to safely transport binary data as text. It offers no security, since anyone can decode it. Use hashing or encryption tools if you need to protect data.
Common uses include embedding images or fonts in CSS/HTML as data URIs, sending binary attachments in email (MIME), placing credentials in HTTP Basic Auth headers, and storing binary values inside JSON or XML that only allow text.