Encode text or files to Base64, decode Base64 back to text, or let Auto-detect pick the direction for you. Supports URL-safe Base64, runs entirely in your browser — nothing is uploaded.
Base64 is a binary-to-text encoding scheme that represents arbitrary byte sequences using a restricted alphabet of 64 characters: the uppercase letters A–Z, lowercase letters a–z, the digits 0–9, and two symbols — usually '+' and '/' — with '=' reserved as a padding character. It was formalized in RFC 4648 (and its predecessor RFC 3548), building on earlier email-encoding schemes like the one used in MIME.
The core idea is simple: computers store data as bytes, but many older text-based protocols — email, early HTTP, certain databases, URLs — were never designed to reliably carry arbitrary 8-bit binary data. Certain byte values could be misinterpreted as control characters, line terminators, or protocol delimiters, silently corrupting the data in transit. Base64 sidesteps this entirely by re-encoding any binary input into a sequence of printable ASCII characters that every text-safe system can pass through unchanged. The tradeoff is size: because it only uses 6 bits of information per output character instead of a full 8, Base64-encoded data is about 33% larger than the original. In exchange, it gains near-universal compatibility, human-typeable output, and safe round-tripping through systems that would otherwise mangle raw binary bytes.
Base64 encoding works by processing input data in groups of three bytes (24 bits) at a time. Those 24 bits are re-divided into four groups of 6 bits each, and each 6-bit group — which can represent a value from 0 to 63 — is mapped to one character from the 64-character Base64 alphabet using a lookup table. If the final group of input bytes doesn't divide evenly into three, the encoder pads the last chunk with zero bits and appends one or two '=' characters to the output, signaling to the decoder exactly how many extra bytes to discard.
Decoding simply reverses this process: each character is converted back to its 6-bit value, the groups are reassembled into 8-bit bytes, and any padding is stripped away. Because every step is a deterministic, well-defined transformation with no randomness or secret key involved, the same input always produces the same Base64 output, and the process is fully and losslessly reversible.
Base64 appears throughout modern software wherever binary or special-character data needs to travel through a text-only channel. Email systems use it (via MIME) to attach images, documents, and other files to messages sent over text-based SMTP. Web developers use it to embed small images and fonts directly inside HTML or CSS as data: URIs, avoiding extra network requests.
APIs frequently encode binary fields — certificates, encryption keys, file uploads, thumbnails — as Base64 strings inside JSON payloads, since JSON has no native binary type. Authentication systems use it too: HTTP Basic Auth encodes credentials, and JSON Web Tokens (JWTs) encode their header and payload segments as URL-safe Base64. Configuration files and environment variables sometimes store binary secrets, like TLS certificates or signing keys, as Base64 text so they can be safely copied, version-controlled, and pasted without corruption. Anywhere a system expects plain text but the data itself is binary, Base64 is usually the bridge.
It's important not to confuse Base64 with encryption — they solve completely different problems. Encryption transforms data using a secret key so that only someone with that key can reverse the process and read the original content; without the key, the ciphertext is computationally infeasible to decode. Base64 has no key at all. It's a public, standardized, and fully reversible encoding: anyone, including this tool, can decode any Base64 string instantly with no secrets required. Base64 provides zero confidentiality — it only changes data's representation, not its accessibility. Never use Base64 alone to protect passwords, API keys, or other sensitive information; use real encryption or a secrets manager instead.
Base64 is just one piece of the encoding and identifier toolkit developers reach for daily. If you're working with URLs, HTML entities, cryptographic hashes, or unique identifiers, these related tools cover the rest of that workflow — all running locally in your browser, just like this one.