Base64 Encode and Decode

Encode text to Base64 or decode it back, with full UTF-8 support.

🔒 Runs entirely in your browser. Nothing you enter is uploaded or stored.

What is the Base64 Encode / Decode?

Base64 is a way to represent any binary data using only 64 safe characters: A–Z, a–z, 0–9, + and /, with = as padding. It is used wherever binary data has to travel through a text-only channel: email attachments (MIME), data URIs in HTML and CSS, HTTP Basic authentication headers, JSON payloads and JWT tokens.

This tool is UTF-8 safe. The browser's built-in btoa() fails on characters such as é, ₹ or emoji. This tool first converts your text to UTF-8 bytes, so any language encodes correctly. Tick URL-safe for Base64url (RFC 4648 §5). It replaces + and / with - and _ and drops the padding, the format used in JWTs and URLs. When decoding, both alphabets and missing padding are accepted automatically.

How to use the Base64 Encode / Decode

  1. Type or paste your text (to encode) or Base64 string (to decode) into the input box.
  2. Click Encode or Decode. Tick Live to update while you type.
  3. Tick URL-safe if the result goes into a URL, filename or JWT.
  4. Copy the output, or use Use output as input to chain operations.

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding, not encryption. Anyone can decode it instantly, so never use it to hide passwords or secrets.

Why is Base64 output longer than the input?

Base64 turns every 3 bytes into 4 characters, so encoded data is about 33% larger than the original.

What is the difference between Base64 and Base64url?

Base64url replaces + with - and / with _, and usually removes the = padding. That makes the result safe to put in URLs and filenames without further encoding.

Why does decoding say the data is binary?

The Base64 string contains bytes that are not valid UTF-8 text, such as an image, PDF or compressed file. To view an image, use the Image to Base64 tool or paste the data URI into your browser's address bar.