Base64 Encoder and Decoder
Base64 turns any data into 64 safe characters (A–Z, a–z, 0–9, + and /) so it can travel inside text such as email, JSON or web pages. Every 3 bytes become 4 characters, so encoded data is about 33% larger. “Math” encodes to TWF0aA==.
How to use the Base64 tool
- Choose Encode or Decode.
- Type or paste text, or pick a file to encode. Files are read in your browser and never uploaded; for files you also get a ready-made data URI.
- Tick URL-safe for web addresses and tokens, or add line breaks for email (MIME) format.
How Base64 encoding works
- Write the bytes in binary. “Mat” is 77, 97, 116 = 01001101 01100001 01110100.
- Split the 24 bits into four groups of 6: 010011 010110 000101 110100 = 19, 22, 5, 52.
- Look up each number in the alphabet A–Z (0–25), a–z (26–51), 0–9 (52–61), + (62), / (63): T, W, F, 0. So “Mat” →
TWF0. - If the last group has only 1 or 2 bytes, pad with = signs. “Math” (4 bytes) becomes
TWF0aA==.
Size and uses
Every 3 bytes become 4 characters, so Base64 output is about 4 ÷ 3 ≈ 1.33 times the input size, plus padding. It is used for email attachments, images embedded in web pages and CSS (data URIs), API keys and tokens, and storing binary data in JSON or XML. Base64 is an encoding, not encryption: anyone can decode it, so it does not hide secrets.
Base64 practice questions
Test yourself with 6 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
+ and / have special meanings in web addresses, so – and _ are used instead.
Quiz complete
Frequently asked questions
What is Base64 used for?
It lets binary data such as images, files or keys travel through systems that only handle text, like email, JSON and HTML.
Why does Base64 end with = or ==?
The = signs are padding. Base64 works in groups of 3 bytes; when the data length is not a multiple of 3, one or two = signs fill the last group.
Can Base64 handle emojis and accented letters?
Yes. This tool first turns text into UTF-8 bytes, so any language and emoji encode and decode correctly.
Is it safe to paste private data here?
The conversion runs in your browser and nothing is sent to a server. Remember that Base64 itself is not encryption.
Sources
Related tools
Related to This Article
More math articles
- Institutional conflict and cooperation
- 3rd Grade IAR Math FREE Sample Practice Questions
- 10 Most Common 3rd Grade PARCC Math Questions
- Voter turnout
- 5 Hidden Math Concepts Behind Today’s Most Popular Financial Platforms
- The Best HiSET Math Worksheets: FREE & Printable
- LBS to KG Converter
- Mississippi MAAP Algebra 1 Free Worksheets: 64 Free Skill-by-Skill Algebra 1 PDFs with Answer Keys
- Agenda setting
- Fiscal Policy, Deficits, and Public Debt


What people say about "Base64 Encoder and Decoder: Text and Files, UTF-8 Safe"?
No one replied yet.