Base64 for beginners
Base64 sounds technical, but the idea behind it is ordinary: some channels only accept plain text, and Base64 is a way of sending anything else through them. This guide starts from zero. It explains what Base64 is, what it is not, the 64 characters it uses, and how to encode and decode your first words, with every example checked by hand. Try the examples on the Base64 Encoder Decoder as you read.
What Base64 actually is
Base64 is a way of writing binary data — the raw bytes of a file, a picture or a password — using only letters, digits and two symbols. The reason it exists is that many systems were built for text only. Email was designed for letters, not files, so an attachment has to be turned into text before it can travel, and Base64 is the standard way of doing it. The same trick appears inside web pages, where a small image can be written directly into the page as text, and in logins, where a username and password travel as one encoded string. In every case the job is the same: carry bytes through a place that only accepts text.
What Base64 is not
Base64 is not encryption, and it is not compression. Anyone who sees an encoded string can decode it in a second, with no key and no password, so it hides nothing. It also makes data bigger, not smaller: three bytes become four characters, so the output is about a third longer than the input. Base64 does one job: making binary data safe to carry as text. Treating it as security is the single most common beginner mistake, so it is worth saying plainly: an encoded password is not a hidden password.
The 64-letter alphabet
The name says it: Base64 uses 64 characters. They are the capital letters A to Z, the small letters a to z, the digits 0 to 9, plus and slash. Each character stands for a number from 0 to 63: A is 0, Z is 25, a is 26, z is 51, 0 is 52, 9 is 61, plus is 62 and slash is 63. There is one extra character, the equals sign, which is not part of the alphabet at all; it is padding, added at the end when the input does not divide neatly into groups of three bytes. There are only 64 characters, all safe to type, copy and paste anywhere.
Your first encode
Type the word Hello into the encoder and you get SGVsbG8=. That is five letters turned into eight characters, with one equals sign at the end. Change one letter and the whole result changes: hello with a small h encodes to aGVsbG8=, which looks nothing like SGVsbG8=. Try a short word next: Hi encodes to SGk=, and Yes encodes to WWVz. Every result is a multiple of four characters long, with the equals signs only at the end.
Your first decode
Decoding runs the same steps backwards. Take SGVsbG8=, turn each character back into its number, join the bits, split them into bytes, and read the letters: H, e, l, l, o. If the string has an equals sign at the end, the decoder knows the last group was short and drops the padding bits. Decoding a string you did not encode yourself is the real test: QmFzZTY0 decodes to Base64, and V2hpdGVVSQ== decodes to WhiteUI. If the result is gibberish, a character is probably missing — usually an equals sign at the end.
Text beyond English
Base64 works on bytes, not letters, so non-English text encodes just as well, but the byte count is different from the letter count. The word Café looks like four letters, but é takes two bytes in UTF-8, so Café is five bytes and encodes to Q2Fmw6k=. The rupee sign takes three bytes and encodes to 4oK5. An emoji takes four bytes and encodes to 8J+YgA==. The rule to remember is simply to count bytes, not characters.
Frequently asked questions
What is Base64 in simple words?
A way of writing any data using only 64 safe characters, so binary data can travel through systems that only accept plain text, such as email.
Is Base64 encryption?
No. Anyone can decode a Base64 string with no key or password, so it hides nothing. It is a transport format, not security.
What is Hello in Base64?
SGVsbG8=. The lowercase hello is different: aGVsbG8=. Capital letters matter.
Why does Base64 end with = signs?
Padding. The output must be a multiple of four characters, so = signs fill the last group when the bytes do not divide evenly into threes.
More guides on the Base64 Encoder Decoder
- How to calculate base64
- Base64 formula explained simply
- Base64: worked example step by step
- Common mistakes when calculating base64
- Base64 vs URL encoding: what's the difference
- How to use a base64 calculator
- Base64 quick reference table
- Base64 in real life: everyday examples
- Base64 practice questions with answers
Try the Base64 Encoder Decoder — free, in your browser.