TBToolbox
Encoding

Base64 Decoder

Base64 Decoder trims outer whitespace, decodes the standard Base64 alphabet with the browser atob function, and interprets the resulting bytes as UTF-8 text. It is designed for text payloads, not arbitrary binary downloads. Invalid Base64 syntax returns an error, while malformed UTF-8 byte sequences can become replacement characters because the decoder is not configured in fatal mode.

Runs locally — files stay on your device
Quick answer

Can this decoder recover any Base64 file?

It can decode the bytes, but the page renders them as UTF-8 text rather than downloading arbitrary binary data.

Base64 decoding and text decoding are two stages

Base64 first reconstructs bytes. UTF-8 then maps those bytes to Unicode characters; the second step can be inappropriate for images, archives, or encrypted data.

How it works

Outer whitespace is removed, atob converts Base64 characters to byte values, and TextDecoder produces a JavaScript string.

Key concepts

Standard alphabet

The page does not translate Base64url - and _ characters.

Replacement characters

Invalid UTF-8 can be displayed with � instead of failing.

When to use it

  • Read a known UTF-8 text payload.
  • Inspect a Base64-encoded JSON or message.
  • Round-trip output from the text Base64 Encoder.

When not to use it

  • Do not use it for a binary file download.
  • Do not treat decoded text as trusted markup or code.
  • Do not expect Base64url characters to be normalized.

Worked examples

ASCII

Input
SGVsbG8=
Expected output
Hello

The decoded bytes are valid UTF-8.

Base64url

Input
Value containing - or _
Expected output
Possible error

No alphabet conversion occurs.

Image payload

Input
PNG as Base64
Expected output
Unreadable text

Binary bytes are interpreted as UTF-8.

Common mistakes

Expecting decryption

Base64 has no secret key. Correction: Use the appropriate cryptographic system.

Pasting a full data URL

The prefix is not removed. Correction: Paste only the payload after the comma.

Executing decoded content

Encoding provides no trust. Correction: Validate output before use.

Best practices

  • Confirm the alphabet and expected content type.
  • Treat decoded data as untrusted.
  • Use a file-aware decoder for binary payloads.

Related operations and differences

Base64 Encoder

Choose Base64 Encoder when you need to encode text as Base64 in your browser.; use Base64 Decoder specifically for base64.

Binary to Text

Choose Binary to Text when you need to decode 8-bit binary groups into text.; use Base64 Decoder specifically for base64.

Hex to Text

Choose Hex to Text when you need to decode hexadecimal bytes into text.; use Base64 Decoder specifically for base64.

ROT13 Decoder

Choose ROT13 Decoder when you need to decode ROT13 text locally.; use Base64 Decoder specifically for base64.

Text to Binary

Choose Text to Binary when you need to encode text as 8-bit binary groups.; use Base64 Decoder specifically for base64.

Text to Hex

Choose Text to Hex when you need to encode UTF-8 text as hexadecimal.; use Base64 Decoder specifically for base64.

Limitations and privacy

  • Standard Base64 text only; no Base64url normalization, data-URL parsing, binary download, streaming, integrity check, or strict UTF-8 failure.
  • Only outer whitespace is trimmed.

The entered value is transformed locally in this browser and is not sent to the Toolbox server.

Copying or pasting sensitive output into another service is a separate disclosure decision.

Frequently asked questions

Does it support Unicode text?

Yes, when the decoded bytes are valid UTF-8.

Does it decrypt secrets?

No.

Can it decode an image into a file?

No.

Why do I see �?

The decoded bytes were not valid UTF-8 at that position.

References