Base64 Encoder and Decoder

Convert text or files to Base64 or decode from Base64 back to plain text. Files are read in your browser, not uploaded.

I want to:
0 characters

Frequently asked questions

Is Base64 a form of encryption?

No. It is an encoding, not a cipher. Anyone can decode it in a second, so it hides nothing. It exists to make data survive being sent as plain text.

Why does encoded text sometimes end in equals signs?

Base64 works in blocks of three bytes. When the last block is short, equals signs pad it out, so you see one or two of them at the end.

Can I decode a Base64 string back to the original text?

Yes, as long as the string is valid. Switch to decode and paste it in. A string containing characters outside the Base64 alphabet will be rejected rather than half-decoded.

Why is the encoded version bigger than what I started with?

Base64 spends four characters on every three bytes, so the result is about a third larger. That size is the price of making binary data safe to move as text.

Where is Base64 actually used?

Email attachments, images embedded directly in HTML or CSS as data URIs, tokens and credentials in APIs, and anywhere binary content has to pass through something that only handles text.

Can I encode an image or a PDF?

You can encode a file, but keep it small. A large file becomes an extremely long string, and it is a third bigger than the file was to begin with.