Skip to content
BENIBIX Learn

Base64

Development📄 Files & FormatsText

Also known as Base 64, Base64 Encoding

Any data written with only letters and digits. Then it can go where only text goes.

Think of it like

Think of it like packing odd toys in boxes of one size. Nothing is hidden, just packed.

Example

Jack puts a small logo straight into his web page as Base64 text. The browser turns it back into the picture.

Why it matters

It lets pictures and files ride inside text-only formats. You see it in emails, tokens and data URLs.

Definition

Base64 writes any data, even a picture, with just 64 safe characters. Those are A to Z, a to z, 0 to 9, plus and slash. It is used where only plain text can travel, like inside emails, JSON or web addresses. The result is about a third bigger than the original. It is not a secret code: anyone can turn it back in one step.

Example code

console
$ echo -n "Hi Emma" | base64
SGkgRW1tYQ==
Six letters in, eight safe characters out.

Common mistake

Thinking Base64 hides data. It is not encryption, and anyone can read it back.

Key takeaways

  1. 1
    64 safe signs. Letters, digits, plus and slash.
  2. 2
    About a third bigger. Four characters for every three bytes.
  3. 3
    Not a secret. Anyone can turn it back.

Compare

Learn it properly