Base64 Decoder - Text & File Decoding
Back to ToolsAbout Base64 Decoding
Decode Base64 encoded strings back to original text or binary data. Essential for email attachments, data URLs, API responses, and encrypted data transmission. Handles both text and file content.
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 Decoding Examples
Simple Text Decoding
Input:
SGVsbG8gV29ybGQhOutput:
Hello World!HTTP Basic Auth Decoding
Input:
QWxhZGRpbjpvcGVuIHNlc2FtZQ==Output:
Aladdin:open sesameJSON Data Decoding
Input:
eyJuYW1lIjoiSm9obiIsImFnZSI6MzB9Output:
{"name":"John","age":30}URL Decoding
Input:
aHR0cHM6Ly9leGFtcGxlLmNvbS9wYXRoOutput:
https://example.com/pathBase64 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 Convert Base64 characters to 6-bit values
- 2 Combine 6-bit values into 8-bit bytes
- 3 Handle padding and create binary output
- 4 Convert binary to text/data format
Padding Information
= - One missing byte== - Two missing bytesNo padding - Perfect alignment