If you've ever seen a long string of letters, digits, and the characters +, /, ending in =, that's most likely Base64. Let's break down in plain terms what it is and why it's used.
What is Base64
Base64 is a way to represent any data (text, an image, a file) using just 64 "safe" characters: the Latin letters A–Z, a–z, digits 0–9, and the symbols + and /. The = sign at the end is "padding."
The main idea: turn arbitrary bytes into text that can pass, undistorted, through systems designed to handle only text.
Why it's needed
Many protocols and formats can only carry text, not "raw" bytes. Base64 solves that problem:
- Images embedded right in HTML/CSS. A small image can be embedded in the code as a
data:image/png;base64,...string — no separate file needed. - Email attachments. Email has historically been text-only, which is why files attached to emails are encoded in Base64.
- Passing data in JSON and APIs. Binary data (such as a file) is packed into a Base64 string so it can go into a text field.
- Storing tokens and keys as text.
Important: Base64 is NOT encryption
This is a common misconception. Base64 doesn't hide data: anyone can decode the string back in an instant. It's simply repackaging, not protection. If you need to hide data, use encryption; to verify integrity, use hashes (see the hash calculator).
How to encode and decode
Use the Base64 tool: paste in text to get Base64, or paste in Base64 to get the original string back. Everything runs locally in the browser.
Base64 and URLs
Regular Base64 contains the characters + and /, which conflict with page addresses. For URLs, you either use a separate variant (URL-safe Base64) or encode the address itself — for the latter, the URL Encode / Decode tool comes in handy.