You've probably seen Base64 before — that long string of letters, numbers and + / / characters with occasional = padding at the end. It shows up in data URLs, email attachments, and JSON web tokens. Here's what it actually is and how to use it.
What is Base64 encoding?
Base64 is a way of representing binary data using only printable text characters. It takes the raw bytes of a file or string and converts them into a set of 64 characters (A–Z, a–z, 0–9, + and /) that can safely travel through systems designed for text. For example, the word "Hi" becomes SGk=.
Why is Base64 used?
Base64 isn't for saving space — in fact it makes data about 33% larger. It's used to keep data safe in transit through text-only channels:
- Embedding images — a small image can be turned into a data URL and embedded directly in HTML or CSS.
- Email attachments — email was built for text, so binary files are Base64-encoded to travel safely.
- Web tokens and APIs — JSON Web Tokens (JWTs) carry their payload as a Base64-encoded string.
- Storing binary in JSON — JSON can only hold text, so binary data is Base64-encoded first.
How to encode text or files to Base64
You don't need to memorize the algorithm. Use our free Base64 Encoder / Decoder:
- 1.Paste your text into the input box, or upload a file.
- 2.Click Encode to convert it to Base64.
- 3.Copy the result with one click.
How to decode Base64 back
Decoding is the same process in reverse: paste the Base64 string, click Decode, and you'll get the original text or file back. If the string was an image, the tool shows a preview so you can confirm it decoded correctly.
Base64 is not encryption
A common misconception is that Base64 hides data. It doesn't — anyone can decode a Base64 string back to its original form, since no key or secret is involved. If you need to protect data, use real encryption. Base64 only makes data transportable, not secure.
Frequently asked questions
Why does Base64 end with = characters?
The = is padding. When the input's byte count isn't a multiple of three, padding is added so the decoder knows where the data ends.
Does Base64 make files bigger?
Yes — roughly 33% larger, because it uses four text characters to represent every three bytes of data.
Is it safe to paste sensitive data into an online Base64 tool?
With ours, yes — encoding and decoding runs entirely in your browser, so nothing is uploaded to a server.
Ready to try Base64?
Use the free, in-browser Base64 Encoder / Decoder — encode and decode text or files in one click, with nothing uploaded.
Encode / decode now