Base64 Encoder & Decoder

Encode text or files to Base64, or decode Base64 back to readable text. UTF-8 and URL-safe supported.

Was this tool helpful?

How to use the Base64 Encode / Decode

  1. 1Choose Encode or Decode.
  2. 2Paste text, or drop a file to get its Base64 data URI.
  3. 3Copy the result.

What is Base64?

Base64 represents binary data using 64 printable characters (A–Z, a–z, 0–9, + and /). It is used to embed images in HTML/CSS, send attachments in email, and put binary data inside JSON or URLs. Encoded data is about 33% larger than the original. URL-safe Base64 replaces + and / with - and _.

Where you'll see Base64

  • Data URIs: small images embedded directly in HTML or CSS (data:image/png;base64,…).
  • Email attachments: MIME encodes attachments as Base64.
  • JSON Web Tokens (JWT): the header and payload are Base64URL-encoded, so anyone can decode and read them.
  • HTTP Basic authentication sends username:password as Base64, which is why it must only be used over HTTPS.

Size overhead

Base64 turns every 3 bytes into 4 characters, so encoded data is about 33% larger than the original. That is fine for small icons and tokens but wasteful for large files. Base64URL replaces + and / with - and _ so the result is safe inside URLs.

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding, not encryption: anyone can decode it. Never use it to protect secrets.

Is my data sent anywhere?

No. Encoding and decoding happen in your browser.