Base64 Encode & Decode

Encode or decode Base64 strings instantly. 100% client-side — your data never leaves the browser.

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into an ASCII string format. It uses 64 characters (A-Z, a-z, 0-9, +, /) to represent data, making it safe for transport over text-based protocols like email (MIME) and URLs.

Common Use Cases

  • Embedding images in HTML/CSS using data URIs
  • Encoding binary data in JSON or XML payloads
  • Email attachments via MIME encoding
  • Storing complex data in cookies or URL parameters
  • Basic HTTP authentication headers

How Does Base64 Work?

Base64 encoding takes every 3 bytes (24 bits) of input and splits them into 4 groups of 6 bits. Each 6-bit group maps to one of 64 printable ASCII characters. If the input length is not a multiple of 3, padding characters (=) are added.

Privacy & Security

This tool runs entirely in your browser using JavaScript. No data is transmitted to any server. Your input stays on your device at all times.