Base64 编码解码

调整下方数值,然后点击“计算”查看结果。
结果
输入数值,然后点击“计算”。
广告

以下详细说明暂以英文提供。

What Base64 is for

Base64 rewrites arbitrary bytes using 64 safe ASCII characters, letting binary data travel through text-only channels: email attachments (MIME), data URIs that embed images in stylesheets, and HTTP basic-auth headers. Every three input bytes become four output characters, so encoded text is always about a third larger than the original.

Unicode handled correctly

Classic Base64 tools choke on characters outside ASCII because they operate byte by byte. This converter first encodes the text as UTF-8, then applies the Base64 alphabet to those bytes — the same convention JavaScript's escape trick and most web platforms follow, so accented letters, emoji, and CJK text round-trip exactly.

常见问题

Why does the encoded text end with = signs?

Padding characters make the length a multiple of four when the input does not divide evenly into three-byte groups. One = means two extra bytes were in the final group; two = means one. Padding is safe to infer, but including it keeps the output standard.

Is Base64 a way to hide sensitive data?

No. It is a reversible encoding with no key — anyone can decode it instantly. Use it for transport and storage compatibility, and rely on real encryption for secrecy.

相关计算器