Base64 Encode/Decode

Encode text to Base64 or decode Base64 strings instantly in your browser. Supports UTF-8 and binary data.

100% client-side — your data never leaves your browser

Related Tools

Base64 Encode and Decode Online

Encode any text to Base64 or decode Base64 strings back to plain text. This tool processes everything in your browser — your data never leaves your device.

How to Use

  1. Paste or type your text into the input field
  2. Select a mode: Auto (detects whether to encode or decode), Encode, or Decode
  3. Copy the result from the output field using the Copy button

How Base64 Works

Base64 encoding converts binary data into a text representation using 64 printable ASCII characters. The encoding process takes every 3 bytes (24 bits) of input and splits them into 4 groups of 6 bits. Each 6-bit value maps to one of 64 characters: A-Z, a-z, 0-9, +, and /. If the input length is not a multiple of 3, padding characters (=) are added.

This encoding is commonly used for embedding images in HTML/CSS via data URIs, encoding email attachments (MIME), transmitting binary data in JSON or XML payloads, and storing complex data in URL parameters or cookies.

UTF-8 Support

This tool fully supports UTF-8 text, including emoji, CJK characters, and other multi-byte Unicode. The input text is first encoded to UTF-8 bytes using the TextEncoder API before Base64 encoding, ensuring correct round-trip conversion for any language or symbol set.