Base64 Decoder
Decode Base64 encoded strings back to original text or data.
What is Base64 Decoding?
Base64 decoding is the reverse process of Base64 encoding. It converts Base64 encoded ASCII text back into its original binary or text format. This decoder tool helps you quickly decode Base64 strings without any programming knowledge. Need to encode data instead? Check out our Base64 Encoder tool.
When Do You Need to Decode Base64?
- API Responses: Many APIs return Base64 encoded data that needs to be decoded for use.
- JWT Tokens: JSON Web Tokens (JWT) use Base64 encoding for header and payload sections. Use our JWT Decoder to inspect token contents.
- Data URIs: Extracting the original data from data URIs in HTML/CSS.
- Email Content: Decoding email attachments or encoded MIME content.
- Configuration Files: Some applications store encoded credentials in config files.
How to Use This Base64 Decoder
- Paste your Base64 encoded string in the input field above.
- Click the "Decode from Base64" button.
- The decoded result will appear in the output field.
- Use the "Copy Result" button to copy the decoded text to your clipboard.
Invalid Base64 String?
If you receive an error, your input may not be valid Base64. Base64 strings should only contain characters A-Z, a-z, 0-9, +, /, and = (for padding). Make sure there are no extra spaces or newlines in your input.
Base64 Decoding in Programming Languages
Most programming languages provide built-in functions for Base64 decoding. Here are examples:
PHP
$decoded = base64_decode($encoded);
JavaScript
const decoded = atob(encoded); // Browser
const decoded = Buffer.from(encoded, 'base64').toString(); // Node.js
Python
import base64
decoded = base64.b64decode(encoded).decode()
Go
import "encoding/base64"
decoded, _ := base64.StdEncoding.DecodeString(encoded)
Java
import java.util.Base64;
String decoded = new String(Base64.getDecoder().decode(encoded));
Ruby
require 'base64'
decoded = Base64.decode64(encoded)
C#
string decoded = Encoding.UTF8.GetString(Convert.FromBase64String(encoded));