Quick reference

Understanding Base64

Base64 turns bytes into a text-safe representation. This guide explains what it does, where it helps, and why it should never be treated as encryption.

What is Base64?

Base64 is an encoding scheme that represents binary data using 64 printable characters: uppercase and lowercase letters, numbers, plus, and slash. An equals sign may appear at the end as padding. Because the result is ordinary text, it can travel through systems that are designed for text rather than arbitrary bytes.

Important distinction

Encoding changes the format of data; it does not hide the data. Anyone who can read a Base64 value can decode it.

How it works

Base64 groups input bytes into sets of three, then maps the resulting 24 bits into four six-bit values. Each value selects one character from the Base64 alphabet. Three bytes therefore become four characters, which makes the encoded result about one-third larger than the original.

exampleText: Hello Base64: SGVsbG8=

The trailing = is padding. It indicates that the final group contained fewer than three input bytes and helps decoders restore the original byte boundaries.

When to use it

Base64 is not compression, so avoid it for large files unless a protocol specifically requires it. The added size can increase bandwidth and storage costs.

Try it in your browser

Use the converter to test a value locally. Ozama uses UTF-8 for text, so accents and emoji are preserved correctly.

Quick encode

SGVsbG8gZnJvbSBPemFtYSDinIY=