Base64 Encoder / Decoder

Encode text or files to Base64, or decode Base64 back to text or to the original file. Nothing leaves your device.

Mode

What is Base64?

Base64 represents data using 64 safe characters (A–Z, a–z, 0–9, + and /), so it can travel through email, JSON, URLs and HTML. Every 3 bytes become 4 characters. It is an encoding, not encryption: anyone can decode it.

Example

hello → aGVsbG8=. In base64url without padding it is aGVsbG8. A 1×1 PNG image decodes to “a PNG image” with a preview and a Download button.

Frequently asked questions

How do I convert an image or PDF to Base64?

Choose Encode, press Encode a file instead and pick the file (up to 10 MB). Tick As a data: link to get data:image/png;base64,… ready for HTML or CSS. Base64 is about a third bigger than the file.

How do I turn Base64 back into an image or file?

Choose Decode and paste the Base64, or a whole data: link. If it isn't text, the tool says what it is (PNG, JPEG, PDF, ZIP and so on), shows images, and lets you download the file.

What are base64url, padding and 76-character lines?

base64url (RFC 4648) swaps + and / for - and _ so the text is safe in web addresses and file names, as in JWTs. The = signs at the end are padding that many systems leave out. Email (MIME, RFC 2045) breaks Base64 into lines of 76 characters. The decoder accepts all of these.

Does it work with other languages and emoji?

Yes. Text is turned into UTF-8 bytes before encoding, so Hindi, Arabic, Chinese, accents and emoji all round-trip exactly.

Is Base64 secure?

No. It only changes the format, and anyone can decode it. Never use it to hide passwords or secrets.

More text and developer tools

See all text and developer tools →

Can't find the tool you need? Tell us.