Skip to content

Base64 Encode & Decode (Text and Files)

Encode text or any file to Base64 and decode it back, standard or URL-safe, with Hindi and emoji kept intact. Nothing is uploaded.

Private · on device. Runs in your browser: your file is not uploaded. No sign-up.

Text

Result

Text and files, both ways

Encode text as you type, decode pasted Base64 back to text, turn any file into Base64 (optionally as a data: URL for HTML or CSS), or rebuild a file from Base64. Every step happens in your browser, so private files and keys never leave your device.

Tips

  • To put a small image straight into a web page, encode it as a data: URL. Keep it small: Base64 adds about a third to the size.
  • If decoded text looks garbled, the data is probably a file rather than text; switch to "Base64 → file".
  • JWTs are three URL-safe Base64 parts joined by dots; the JWT decoder reads them for you.

Frequently asked questions

What is Base64?

A way of writing any data, a picture or a PDF, using only 64 plain characters (A–Z, a–z, 0–9, + and /), so it can travel through systems that only handle text, such as email, JSON and web pages. It makes data about a third larger. It is an encoding, not encryption: anyone can decode it.

What is URL-safe Base64?

The same encoding with - and _ in place of + and /, and usually without the = padding, so it can sit in a web address or file name without being changed. JSON Web Tokens use it. The decoder reads both kinds.

Why does Hindi text decode wrongly in other tools?

Text must be turned into bytes before encoding, and some tools use a single-byte scheme that cannot hold Hindi or emoji. This tool uses UTF-8 in both directions, the standard the web uses, so नमस्ते comes back as नमस्ते.

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

Choose "Base64 → file", paste the text (a data: URL is fine) and download the file. The tool looks at the decoded bytes to tell you what kind of file it is and give it the right extension.

Is it safe to decode a file someone sent me?

Decoding only rebuilds the bytes; nothing is run. If the result is a program, script or archive, the tool says so and saves it with a .bin extension so it cannot be opened by accident. Do not run a program from someone you do not trust.