Decode and encode Base64 strings with a single click. All client-side.
Paste a Base64 string in the input box and click Base64 Decode to convert it back to plain text. Click Base64 Encode to go the other direction. All processing runs locally in your browser — no data is sent to any server.
Base64 decoding is the inverse of encoding: it converts Base64-encoded text (using the 64-character alphabet A–Z a–z 0–9 + /) back into its original binary or text form. Every 4 Base64 characters decode back to 3 original bytes.
The decoded output may be plain text, an image, a PDF, or any other binary data — depending on what was originally encoded.
- with + and _ with / before decoding, or use the JWT Decoder.Content-Transfer-Encoding: base64 followed by the encoded data.data:image/png;base64,...) embed files inline. Strip the data:...;base64, prefix before decoding the payload.// Decode Base64 to string
const decoded = atob('SGVsbG8sIFdvcmxkIQ=='); // "Hello, World!"
// Decode to Uint8Array (for binary data)
const binary = atob('SGVsbG8=');
const bytes = Uint8Array.from(binary, c => c.charCodeAt(0));
// Decode Base64url (JWT segments — replace URL-safe chars first)
function decodeB64url(str) {
str = str.replace(/-/g, '+').replace(/_/g, '/');
while (str.length % 4) str += '=';
return JSON.parse(atob(str));
}
import base64
# Decode Base64 to string
data = base64.b64decode('SGVsbG8sIFdvcmxkIQ==')
text = data.decode('utf-8') # "Hello, World!"
# Decode URL-safe Base64 (from JWTs)
data = base64.urlsafe_b64decode('SGVsbG8' + '==') # add padding as needed
- and _) that need to be converted first.- with + and _ with /, then add = padding until the string length is a multiple of 4, then decode as standard Base64. Or use the JWT Decoder for structured output.