F

Base64 编解码Base64 Encoder/Decoder

Base64编码与解码,支持文本和文件Base64 encode and decode, supports text and files.

关于 Base64 编解码About Base64 Encoder/Decoder

Base64 把二进制数据编码为 64 种可打印字符,常用于在 JSON、URL、邮件等“纯文本通道”中安全传输二进制内容。本工具支持文本与文件的 Base64 编码、解码,正确处理中文与 Emoji 等 UTF-8 字符,实时互转、一键复制。Base64 encodes binary data into 64 printable characters, letting binary content travel safely through text-only channels such as JSON, URLs and email. This tool encodes and decodes Base64 for text and files, correctly handling UTF-8 characters like Chinese and Emoji, with instant conversion and one-click copy.

使用方法How to Use

  1. 在输入框填写文本,或直接选择文件。Type text into the input box, or choose a file.
  2. 点击「编码」得到 Base64 字符串;点击「解码」将 Base64 还原为原文。Click "Encode" to get a Base64 string, or "Decode" to restore the original.
  3. 含中文或 Emoji 的文本会按 UTF-8 正确处理,避免乱码。Text with Chinese or Emoji is handled as UTF-8 to avoid mojibake.
  4. 复制结果用于 Data URL、接口参数或配置文件。Copy the result for Data URLs, API parameters or config files.

常见问题FAQ

Base64 是加密吗?Is Base64 encryption?

不是。它只是一种编码方式,任何人都能无条件解码,绝不能用来保护敏感信息;需要保密请使用真正的加密算法。No. It is merely an encoding that anyone can decode unconditionally — never use it to protect sensitive data; use real encryption for secrecy.

为什么编码后体积变大了?Why does the encoded data get larger?

Base64 用 4 个字符表示 3 个字节,体积约增大 1/3。这是“把二进制当文本传输”所付出的代价。Base64 represents 3 bytes with 4 characters, inflating size by about a third — the price of carrying binary through text channels.

解码出来是乱码怎么办?What if decoding shows garbled text?

通常原内容是二进制(如图片)或使用了非 UTF-8 编码。二进制内容应解码为文件下载查看,而不是按文本展示。The original is usually binary (e.g. an image) or in a non-UTF-8 encoding. Binary content should be decoded to a file rather than displayed as text.

Base64 编码有保密作用吗?Does Base64 encoding provide secrecy?

没有。Base64 是编码不是加密,任何人都可以解码还原。需要保密应使用 AES 等加密算法;可配合本站密码生成器生成强密钥。No. Base64 is encoding, not encryption — anyone can decode it back. For confidentiality, use an encryption algorithm like AES; pair it with the password generator for strong keys.

为什么解码中文会乱码?Why does decoding Chinese produce mojibake?

乱码通常是因为解码后没有按 UTF-8 解释字节序列。本工具默认按 UTF-8 处理中文与 Emoji;从其他平台复制内容时请先确认原始编码方式。Mojibake usually means the bytes were not interpreted as UTF-8 after decoding. This tool defaults to UTF-8 for Chinese and Emoji; when copying from other platforms, confirm the original encoding first.

相关阅读Related Reading

相关工具Related Tools