Decoding Base64 Safely Without Mojibake or Padding Errors
Real-world Base64 copied from email MIME attachments, PEM certificate blocks, Kubernetes YAML manifests, or OAuth responses frequently includes 64- or 76-character line wraps, stray spaces, or stripped = padding. Strict decoders fail immediately on those inputs even though the underlying 6-bit stream is intact.
ByteHelpers normalizes whitespace, validates characters against RFC 4648 alphabets, restores required padding modulo 4, and decodes the raw byte buffer through UTF-8 TextDecoder locally in memory. If your decoded result is JSON, you can inspect or copy it straight into the JSON Formatter without a single byte leaving your browser.
- ToleranceStrips CR/LF and spaces from 76-char MIME blocks and auto-repairs omitted = padding before decoding.
- UTF-8 DecodingUses TextDecoder("utf-8") to reconstruct multibyte Unicode cleanly without Latin-1 mojibake.
- Binary DetectionHighlights non-printable control bytes so you can switch directly to Base64-to-Hex or Base64-to-Image when decoding binary blobs.
Why do I see garbled characters like é when decoding Base64 with atob()?
Because window.atob() returns a binary string where each character code represents one raw byte (Latin-1), not a decoded UTF-8 sequence. Multi-byte characters like é (0xC3 0xA9) must be passed through TextDecoder("utf-8").
How do I decode a Base64 Kubernetes Secret value quickly?
Copy the value under data: in your Kubernetes Secret YAML and paste it here. Because ByteHelpers executes 100% client-side, your credentials never cross the network.
What does a Data URI prefix like data:text/plain;base64, mean?
Everything before the comma is a MIME media-type header defined by RFC 2397. Only the substring after the comma is Base64 data, which ByteHelpers can strip automatically.