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
- Paste or type your text into the input field
- Select a mode: Auto (detects whether to encode or decode), Encode, or Decode
- 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.