Base64 Encode & Decode

Encode text to Base64 or decode Base64 back to text, with full UTF-8 support and a URL-safe option. Convert any file or image to a Base64 data URI, or turn Base64 back into a downloadable file.

What is Base64?

Base64 writes binary data using only 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, so the encoded data is about 33% larger.

  • URL-safe Base64 uses - and _ instead of + and /, and drops the = padding. It is used in JWT tokens and URLs.
  • Data URIs such as data:image/png;base64,iVBOR… embed small images directly in HTML or CSS.
  • Base64 is encoding, not encryption: anyone can decode it.

Frequently asked questions

How do I decode a JWT token?

A JWT has three parts separated by dots. Paste the middle part (the payload) in Decode mode. It is URL-safe Base64, which this tool detects automatically.

Is my file uploaded?

No. Files are read and encoded in your browser and never leave your device.