Base64 Decode

Decode Base64 to readable text

What is Base64 Decode?

Base64 decoding converts Base64-encoded data back to its original text or binary format. Base64 encoding reversibly transforms data into ASCII characters using 64 symbols (A-Z, a-z, 0-9, +, /), and decoding reverses this process. This is essential for extracting original content from encoded email attachments (MIME), data embedded in URLs and data URIs, API responses that encode binary payloads, JWT tokens, and configuration files that use Base64 for compatibility with text-only systems. The encoding increases data size by approximately 33%, and decoding restores the original size.

How to Use

  1. Paste your Base64-encoded string in the input field.
  2. Click 'Decode' to convert it back to the original text.
  3. The decoded result appears in the output field.
  4. Click 'Copy' to copy the decoded text to your clipboard.
  5. Use 'Load Sample' to see how decoding works with example data.
  6. If input is invalid, an error message will appear explaining the issue.

Why Use This Tool?

Instantly decode Base64 strings to their original content
Support for UTF-8 encoded text with proper character handling — international text decodes correctly
Clear error messages for invalid or malformed Base64 input — no silent failures
One-click copy for quick integration into your workflow
Works entirely in browser — no server processing required, your data stays private
Essential for debugging API responses, JWT tokens, and encoded email attachments

Tips & Best Practices

  • Valid Base64 contains only A-Z, a-z, 0-9, +, /, and = (padding). Any other characters indicate an invalid or modified string.
  • Padding characters (=) at the end ensure correct byte alignment. Some systems omit padding — this decoder handles both.
  • URL-safe Base64 may use - and _ instead of + and /. Replace them before decoding for best results.
  • Base64 strings should have length divisible by 4 (including padding). Odd lengths usually indicate truncation.

Frequently Asked Questions

What if my Base64 string has different characters?

Standard Base64 uses + and /. URL-safe Base64 uses - and _. Some variants omit padding (=). Our decoder handles standard Base64. For URL-safe variants, replace - with + and _ with / before decoding. Some systems use different character sets entirely.

When should I NOT use Base64 decoding?

Do not decode Base64 when: the data is encrypted and you do not have the decryption key (decoding will produce unreadable output); you expect structured data but the decoded result is binary (use a hex viewer instead); or the Base64 string is part of a JWT and you need to verify its signature (use a JWT debugger instead of manual decoding).

Why does my decoded output look strange?

If decoded text appears garbled, the original data might be: binary data (not text), compressed data requiring decompression, encrypted data requiring decryption, or encoded with a different encoding (not UTF-8). Binary data may appear as control characters or gibberish when viewed as text.

Can I decode images or files?

Yes, but the decoded result will be binary data, not human-readable text. For images encoded in Base64 data URIs (data:image/png;base64,...), extract the Base64 part after the comma and decode it. Save the result as a file with the appropriate extension.

What is Base64 padding?

Padding (=) characters at the end of Base64 strings ensure the encoded data has correct byte alignment. Base64 encodes 3 bytes into 4 characters. Input not divisible by 3 gets padding. Strings ending with = or == are padded. Some systems omit padding.

Is my data processed securely?

Yes. All decoding happens entirely in your browser using JavaScript. Your Base64 strings and decoded content are never sent to any server, stored, or transmitted. You can safely decode data containing sensitive information.

Real-world Examples

Decoding a JWT payload

JWT tokens use Base64 to encode their payload section. Decoding reveals the claims (user ID, expiration, roles) stored in the token.

Input
eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ==
Output
{"sub":"1234567890","name":"John Doe","iat":1516239022}

Decoding an HTTP Basic Auth header

HTTP Basic Authentication sends credentials as Base64 in the Authorization header. Decoding reveals the username:password format.

Input
YWRtaW46c2VjcmV0MTIz
Output
admin:secret123

Related Tools