Base64 Encode Decode Calculator
Free base64 encode decode calculator with a clear formula and instant result
Enter text
Free base64 encode decode calculator with a clear formula and instant result
Enter text
Encode text as Base64 or decode a Base64 string in the browser. UTF-8 text is handled before the conversion.
Base64 takes three bytes of binary data and represents them with four characters drawn from a 64-character alphabet. That inflates the payload by about a third but guarantees the result contains only letters, digits and two symbols, so it can travel through systems that accept text only. It is an encoding, not encryption: anyone can reverse it, and it offers no protection for the content.
Padding with equals signs is required when the input length is not a multiple of three, and some decoders reject a string with missing or extra padding. Line breaks and spaces inserted by email or chat clients also break decoding and must be removed first. Because the encoding applies to bytes rather than characters, text is converted to UTF-8 first, which is why one Chinese character becomes several Base64 characters rather than one. URL-safe variants swap two symbols so the output can appear inside a query string.
在浏览器本地完成 Base64 编码或解码,并支持 UTF-8 文本。
Base64 把三个字节的二进制数据用 64 个字符集中的四个字符来表示。体积大约膨胀三分之一,但能保证结果只含字母、数字和两个符号,因此可以穿过只接受文本的系统。它是编码而非加密:任何人都能还原,对内容不提供任何保护。
当输入长度不是三的倍数时必须用等号填充,部分解码器会拒绝填充缺失或多出的字符串。邮件或聊天客户端插入的换行与空格也会导致解码失败,需先清除。由于编码作用于字节而不是字符,文本会先转成 UTF-8,因此一个中文字会变成多个 Base64 字符而不是一个。URL 安全变体会替换两个符号,以便出现在查询字符串中。
No. It is a reversible encoding with no key, so it hides nothing from anyone who has the string.
Every three bytes become four characters, so the size grows by about a third, plus padding.
Missing or extra padding, or line breaks and spaces inserted by email and chat tools, are the usual causes.
A variant that replaces the characters plus and slash so the string can be placed safely inside a URL or filename.
Last reviewed: October 5, 2026 · How we calculate · Sources: Published formula reference; verify domain-specific assumptions before making a decision
最近复核:2026 年 10 月 5 日 · 我们的计算方法 · 来源:公式用于参考;涉及专业决定时请核对适用条件