Send feedback

Coming from the page: Base64 Decode and Encode

One moment…

UTF-8 textImages & filesNo upload

Base64 Decode and Encode

Type text or paste Base64, or turn an image or file into Base64 and back.

Type in either box and the other updates at once: text is encoded as UTF-8, so Arabic, accents and emoji come back exactly.

File → Base64
Base64 → File

Text and files are encoded inside your browser; nothing is uploaded to any server.

How to use it

1

Text

Type in the Text box to get Base64, or paste Base64 in its box to get the text.

2

File or image

In the “File or image” tab, pick a file to get Base64 or a data URI ready for HTML or CSS.

3

Base64 to file

Paste Base64; we detect its type (PNG, JPG, PDF…), preview images, and you download the file.

Good to know

Base64 is not encryption. It only turns data into letters and digits, and anyone can decode it without a key. Never use it to hide passwords or secrets.

It grows by a third. Every 3 bytes become 4 characters, so a 300 KB file becomes about 400 KB. Don’t inline large images as data URIs.

Base64URL. A variant for URLs and JWT that uses - and _ instead of + and / and drops =. Decoding here accepts both automatically.

FAQ

Why does decoded text look garbled in other tools?

They decode the bytes as Latin-1 instead of UTF-8. Here text is encoded and decoded as UTF-8, so accents, Arabic and emoji come back exactly.

How do I convert an image to Base64?

Open the “File or image” tab, pick the image, then choose plain Base64, a data URI for src, a CSS url(), or a full <img> tag.

How do I convert Base64 to a PDF or image?

Paste it into “Base64 → File”; we detect the file type from its first bytes, then press “Download the file”.

Why “the length doesn’t fit”?

Valid Base64 is a multiple of 4 characters with = padding; usually a character was lost or added when copying. Missing = signs are added for you.

Are my files uploaded?

No. Encoding and decoding run in your browser; no file leaves your device.