开发工具

Base64编码与解码

编码文本或文件,并解码Base64。

Base64编码与解码

由 UtilBrix 提供支持

Base64 is an encoding, not encryption. Anyone can decode Base64 content.

输入数据保留在浏览器中,无需账户。

详细方法和示例目前以英语提供。

Step-by-step instructions (English)

  1. Choose Text to Base64, Base64 to Text, or File to Base64.
  2. Paste text for text conversion, or select the source file for file encoding.
  3. Run the conversion and copy or download the output as offered.

公式与方法

Text is converted to UTF-8 bytes before Base64 encoding. Decoding reverses Base64 to bytes and checks that they form valid UTF-8 text. File encoding returns the raw Base64 representation of its bytes. Base64 does not protect confidentiality.

实际示例

The text Hello encodes as SGVsbG8=. Indian-language text and emoji are supported through UTF-8 encoding.

When this tool is useful

Prepare small encoded payloads or inspect a Base64 string returned by an API. The text modes use UTF-8 so characters outside the basic Latin alphabet can be encoded without treating them as single-byte text.

Common mistakes and limitations

  • Base64 is reversible encoding and provides no encryption.
  • Raw Base64 and a data URL are different: a data URL adds a MIME-type prefix that a raw Base64 consumer may not accept.

Practical questions about this tool (English)

Why does decoded binary data fail the text check?

Not every byte sequence is valid UTF-8 text. An encoded image or archive should be handled as binary by the receiving application rather than interpreted as a readable string.

Does Base64 reduce file size?

No. Encoding maps each three bytes to four Base64 characters, with padding where needed. It generally increases the size before any separate transport compression.

相关工具

安装UtilBrix

从主屏幕快速访问工具。

  1. 打开浏览器菜单(⋮)。
  2. 选择“安装应用”或“添加到主屏幕”。
  3. 确认将UtilBrix添加到主屏幕。

如果找不到此选项,请在Android版Chrome中打开页面。

搜索工具

↑ ↓ Navigate · Enter Open · Esc Close