Encode any text to Base64 or decode Base64 back to plain text instantly. Supports Unicode, URL-safe mode, and file upload — all in your browser.
Base64 is a binary-to-text encoding scheme that represents binary data using only 64 printable ASCII characters: A–Z, a–z, 0–9, +, and /, with = used for padding. It's designed to safely transmit data over channels that only support text — like email (MIME), JSON, XML, or URLs.
Every 3 bytes (24 bits) of input are split into four 6-bit groups. Each 6-bit group maps to one of the 64 Base64 characters. If the input isn't a multiple of 3 bytes, the last group is padded with = characters. That's why Base64 output is always about 33% larger than the original binary.
Input: "Man" Bytes: 01001101 01100001 01101110 (3 bytes) 6-bit: 010011 010110 000101 101110 Index: 19 22 5 46 Base64: T W F u Output: "TWFu"
Auto-detect mode is enabled by default. When on, the tool looks at your input and switches modes automatically if it looks like Base64.
Standard Base64 uses + and /, which conflict with URL and filename syntax. URL-safe Base64 (defined in RFC 4648) replaces them:
+ → -/ → _= is often removed entirelyEnable the URL-safe checkbox to use this variant — ideal for JWT tokens, query strings, and safe filenames.
data:image/png;base64,...Base64 is NOT encryption. It's an encoding — anyone can decode it trivially. Never use Base64 to protect passwords, API keys, or sensitive data. For actual security, use AES, RSA, or another proper encryption algorithm.
All encoding and decoding happens in your browser. Your input is never uploaded to a server, never stored, and never shared. Files you upload are read locally using the FileReader API and never leave your device.