Base64 Encoding and Decoding Explained

Follow the text-to-byte-to-Base64 path, see why padding and canonical form matter, and learn exactly what the Calzivo converter accepts.

Written by Calzivo Team

Published: September 22, 2026

Open Base64 Converter

Quick answer

In short

  • Encode: Calzivo encodes entered text as UTF-8 bytes and then uses the standard Base64 alphabet.open the converter
  • Decode: Input must be canonical padded standard Base64 whose bytes decode to valid UTF-8 text.

Base64 represents bytes; it does not hide them

Base64 is a reversible way to represent bytes with a restricted set of text characters. It is useful where a text channel must carry byte data, but it provides no confidentiality. Anyone with the encoded string can decode it; do not treat it as encryption or a way to protect secrets.

From text to Base64

The Base64 Converter first encodes entered text as UTF-8 bytes. Standard Base64 groups those bytes into 24-bit blocks and represents each block as four symbols, with each symbol carrying six bits. Its alphabet uses A–Z, a–z, 0–9, +, and /. An incomplete final block uses = padding: one remaining byte needs two = characters, while two remaining bytes need one.

For example, UTF-8 encodes Hello World as the ASCII-compatible bytes 48 65 6C 6C 6F 20 57 6F 72 6C 64 in hexadecimal. Standard padded Base64 gives SGVsbG8gV29ybGQ=; decoding that value gives exactly Hello World. For a shorter check, Man becomes TWFu with no padding, while M becomes TQ==.

Canonical form and decoding

RFC 4648 describes canonical Base64, including zero unused pad bits. Calzivo checks its decoded result by re-encoding the bytes and requiring the original string to match. This rejects noncanonical trailing bits as well as malformed padding. Decoded bytes must also form valid UTF-8; the tool is for text, not arbitrary binary files.

Standard Base64 versus base64url

Base64url is a distinct RFC 4648 alphabet that uses - and _ in place of + and /. Calzivo accepts only the standard + and / alphabet with required padding. It rejects URL-safe strings, omitted padding, embedded whitespace, and characters outside its exact grammar; it does not silently normalize variants. RFC 4648 defines multiple encodings—these rejections are this tool's chosen scope, not a claim that every application must reject every variant.

Calzivo limits

Raw input is limited to 100,000 UTF-16 code units. The conversion runs on entered text in the browser; there is no file upload, streaming binary conversion, encryption, or automatic line wrapping. A Unicode character can occupy multiple UTF-8 bytes and, for some characters, two UTF-16 code units, so character count is not always byte count.

Reference check

Sources and references

These references provide background context for the topic. They do not replace professional advice or official documents.

Key Takeaway

Use standard padded Base64 to represent UTF-8 text as reversible ASCII symbols; verify canonical form when decoding, and never mistake encoding for secrecy.

Use the tool instead

Use the matching calculator when you want to plug in your own numbers and get a result faster.

Open Converter

Related Tools

Related Guides

More guides coming soon!

Back to all guides