Codec lesson · Base64
Base64: package text in a portable alphabet
Base64 turns bytes into characters from a 64-symbol alphabet. It is convenient for transport, but it is immediately reversible and is not encryption.
Completed in this browser
Base64 turns bytes into characters from a 64-symbol alphabet. It is convenient for transport, but it is immediately reversible and is not encryption.
Encode Keyboard reads the UTF-8 bytes of your text and emits standard Base64 using A–Z, a–z, 0–9, + and /. An equals sign may pad the final four-character block.
How Encode Keyboard handles it
Start with UTF-8 bytes
Unicode text is encoded consistently before Base64 begins.
Re-group the bits
Groups of three bytes become four Base64 characters, with padding when needed.
Require canonical text
Decode ignores whitespace, then checks the standard alphabet, block length, padding, canonical re-encoding, and valid UTF-8 output.
Worked example
HelloSGVsbG8=The final = is padding; it is part of this canonical Base64 value.
Good uses
- Understanding text-safe byte transport
- Inspecting Base64 text from APIs and files
- Creating reversible snippets for non-sensitive data
Validation and common errors
- Output grows by roughly one third
- Malformed padding or non-canonical forms are rejected
- Encoded content remains readable to anyone
Practice in your browser
This uses the same documented rules as the app and runs only in this tab.