Skip to content
Expensico

Base64 Encoder / Decoder

Encode and decode Base64 and Base64URL for text (full UTF-8) and files, including data URLs and image previews. Runs locally.

Runs in your browser. Your files are processed on your device and are never uploaded.

How to use the Base64 Encoder / Decoder

  1. Choose Text or File.
  2. For text, pick Encode or Decode and type or paste your input.
  3. For files, choose a file to get its Base64 or a data URL.
  4. Copy or download the result.

What is Base64?

Base64 represents binary data using 64 printable characters (A–Z, a–z, 0–9, + and /). It lets images, files and binary tokens travel through systems that only handle text — JSON, email, URLs, environment variables. It is an encoding, not encryption: anyone can decode it.

Base64 vs Base64URL

Standard Base64 uses +, / and = padding, which have special meanings in URLs. Base64URL replaces them with - and _ and usually drops the padding. JWTs use Base64URL. The decoder here accepts both.

Unicode text

Text is converted to UTF-8 bytes before encoding, so Indian scripts, emoji and symbols like ₹ round-trip correctly — unlike the browser's raw btoa(), which fails on them.

Example

hello encodes to aGVsbG8=. Every 3 bytes become 4 characters, so Base64 is about 33% larger than the original.

Frequently asked questions

Should I embed images as Base64?

Only small ones such as icons. A data URL is a third larger than the file and can't be cached separately by the browser.

Is my file uploaded?

No. Encoding and decoding run in your browser.