Base64解码器 - 文本和文件解码

返回工具
About Base64 Decoding

将Base64编码的字符串解码回原始文本或二进制数据。对于电子邮件附件、数据URL、API响应和加密数据传输至关重要。处理文本和文件内容。

Decode Features
  • Instant Base64 to text conversion
  • Automatic validation and error detection
  • Handles malformed Base64 gracefully
  • Supports both standard and URL-safe Base64
When to Use Base64 Decode
  • Processing API authentication tokens
  • Analyzing email attachment data
  • Debugging encoded web data
  • Converting data URLs back to readable format
Important: Only decode Base64 from trusted sources. Decoded content may contain executable code or malicious data.
将Base64编码的字符串解码回原始文本或二进制数据。对于电子邮件附件、数据URL、API响应和加密数据传输至关重要。处理文本和文件内容。

Base64 Decoding Examples

Simple Text Decoding
输入: SGVsbG8gV29ybGQh
输出: Hello World!
HTTP Basic Auth Decoding
输入: QWxhZGRpbjpvcGVuIHNlc2FtZQ==
输出: Aladdin:open sesame
JSON Data Decoding
输入: eyJuYW1lIjoiSm9obiIsImFnZSI6MzB9
输出: {"name":"John","age":30}
URL Decoding
输入: aHR0cHM6Ly9leGFtcGxlLmNvbS9wYXRo
输出: https://example.com/path
Base64 Validation Guide

Learn how to identify valid Base64 encoded strings:

  • Contains only A-Z, a-z, 0-9, +, /, = characters
  • Length is multiple of 4 (with padding)
  • Padding (=) only appears at the end
  • Maximum 2 padding characters
Common Issues & Solutions
Invalid Base64 Characters

Remove or replace invalid characters. Only use Base64 alphabet.

Incorrect Padding

Ensure proper = padding at the end (0, 1, or 2 characters).

Garbled Output

Check character encoding. Source might be corrupted or partially copied.

How Base64 Decoding Works
  1. 1 Convert Base64 characters to 6-bit values
  2. 2 Combine 6-bit values into 8-bit bytes
  3. 3 Handle padding and create binary output
  4. 4 Convert binary to text/data format
Padding Information
= - One missing byte
== - Two missing bytes
No padding - Perfect alignment