首页 Home/Base64 / UTF-8 编码 / Base64 Encoder / Decoder

Base64 / UTF-8 编码 · Base64 Encoder / Decoder

Base64 是一种把二进制数据表示为 64 个可打印字符的编码方式,常用于在只支持文本的通道中传输图片、文件等内容,也常见于 Basic 认证和 Data URL。

Base64 represents binary data using 64 printable characters. It is commonly used to carry images and files through text-only channels, and appears in Basic authentication and Data URLs.

Base64 / UTF-8 编码Base64 Encoder / Decoder
INPUT0 chars
OUTPUT
结果会显示在这里
提示:所有处理都在你的浏览器本地完成。输入后自动更新结果

Base64 / UTF-8 编码 / Base64 Encoder / Decoder

功能介绍(中文)

Base64 是一种把二进制数据表示为 64 个可打印字符的编码方式,常用于在只支持文本的通道中传输图片、文件等内容,也常见于 Basic 认证和 Data URL。

本工具使用浏览器的 TextEncoder 与 TextDecoder 处理 UTF-8,因此中文、日文和表情符号都能正确编码与还原,不会出现乱码。编码与解码方向明确切换,也可以一键清空和复制结果。

Overview (English)

Base64 represents binary data using 64 printable characters. It is commonly used to carry images and files through text-only channels, and appears in Basic authentication and Data URLs.

This tool uses the browser's TextEncoder and TextDecoder for UTF-8, so Chinese, Japanese and emoji round-trip correctly without mojibake. Encode and decode are explicit, with one-click clear and copy.

功能特点(中文)

  • UTF-8 安全,支持中文与表情符号
  • 编码 / 解码方向明确切换
  • 忽略空白字符,便于处理换行后的 Base64
  • 全程本地处理,不上传任何文本

Features (English)

  • UTF-8 safe for Chinese and emoji
  • Explicit encode / decode direction
  • Ignores whitespace for wrapped Base64
  • Fully local, nothing uploaded

常见问题 / FAQ

Base64 是加密算法吗?

不是。Base64 只是编码方式,任何人都可以解码,不具备保密性。不要用它存储或传输密码等敏感信息。

Is Base64 encryption?

No. Base64 is an encoding scheme that anyone can reverse. It provides no confidentiality; never use it to protect passwords or secrets.

为什么中文经过 Base64 会变成乱码?

通常是因为编码和解码使用了不同的字符集。本工具统一使用 UTF-8,确保多字节字符在编码和还原时使用同一套规则,因此不会出现乱码。

Why does Chinese text become garbled after Base64?

Usually the encoder and decoder used different character sets. This tool consistently uses UTF-8 on both sides, so multibyte characters round-trip correctly.

← 返回全部工具 / All tools

已复制到剪贴板