Base64 Decoder

Decode Base64 strings back to plain text or binary data

Free Client-Side No Login No Storage
Loading tool...

How to Use the Base64 Decoder

  1. Paste a Base64 string into the input field.
  2. Click Decode to convert back to plain text.

Supports both standard and URL-safe Base64 input. The decoder automatically handles missing padding and URL-safe character substitutions.

What is Base64 Decoding?

Base64 decoding reverses the encoding process, converting Base64-encoded ASCII text back to its original binary or text form. The decoder reads groups of 4 Base64 characters and converts them back to 3 bytes of original data.

Common Uses

  • Inspecting JWT token payloads (header and payload are Base64URL-encoded)
  • Decoding images or files embedded as data URIs
  • Debugging API responses that contain Base64-encoded fields
  • Reading Base64-encoded email attachments (MIME format)

Frequently Asked Questions

Why do I get garbled output when decoding?

The original data was binary (like an image or compressed file), not plain text. Base64 can encode any binary data — if the original wasn't text, decoding to text will show garbled characters.

Can I decode a JWT with this tool?

Yes for the header and payload — split the JWT at the dots, take the first or second part, and decode it. The signature (third part) is a cryptographic hash and won't decode to readable text.

Is Base64 decoding safe to do online?

Aya Corporation runs 100 % in your browser — no data is sent to any server. It is safe to decode sensitive Base64 strings here.

Notes from this implementation

Text out, or bytes that are not text

Decoding reverses the 4-character groups. If the original bytes were UTF-8 text, you get the text back. If they were a PNG, a gzip stream, or a hash, you get a binary mess in a text box, which is a sign to stop and download the bytes rather than to “fix” the charset.

JWT segments are Base64URL. If decode fails, restore the alphabet (- to +, _ to /) and add = until the length is a multiple of 4. A signature segment (the third piece of a JWT) decodes to raw MAC bytes, not to JSON. Seeing garbage there is correct.

Whitespace

MIME email wraps Base64 at 76 columns. The decoder should ignore those line breaks. A stray comma or a smart quote from a chat app will not be ignored. If a paste fails, it is usually one character that is not in the alphabet, not a bug in the padding math.