base64

base64 is a way of writing any file using only ordinary letters, digits and two punctuation marks, so that it can travel inside text.

In more detail

A file is a run of bytes, and a byte can hold values no text format is willing to carry. The trick is to take the bytes three at a time and write them as four harmless characters, so nothing in the original can upset whatever is reading it.

Four characters where there were three bytes makes the whole thing about a third bigger. Nothing else changes: turning it back gives the very same bytes, to the last one.

What it does on a real document

A typeface sent inside a description travels this way, because the description is text and a typeface is not. A file sent as its own part of the call needs none of it, which is why a large picture is better sent as a part than written into the description.

The same encoding turns up inside PDF files themselves, where a stream may be written in it rather than in raw bytes.

Where it comes from, and why

It comes from electronic mail, which for years could carry nothing but plain letters. Attaching a photograph meant writing it as letters, and that is still how a mail attachment travels.

The name counts the alphabet it uses: sixty-four characters chosen because every system in use agreed on them.

Glossary

byte
The unit a file's weight is counted in, the way a parcel is counted in grams. A thousand of them make a kilobyte, and a million make a megabyte — the size of one photograph taken with a telephone. A one-page PDF here weighs between six thousand and a hundred and twenty thousand, so a hundred of them fit in the space of five photographs.
font
The drawing of every letter, digit and mark a document writes, held in a file of its own. A PDF carries the fonts it is set in inside itself, which is why it opens looking the same on a machine that has never had them. Leave them out and a reader puts another font in their place, and the layout moves.

Every word the site explains

Back to the whole glossary