Convert text to Base64 and back. Runs entirely in your browser — nothing is sent to a server.
Base64 is a binary-to-text encoding scheme that represents binary data as a string of printable ASCII characters. It uses a set of 64 characters — the uppercase and lowercase Latin letters (A–Z, a–z), the digits 0–9, and two additional symbols (+ and /). The name comes directly from this 64-character alphabet. Every three bytes of input data are converted into four Base64 characters, making the encoded output roughly 33% larger than the original.
Encoding takes each group of three input bytes (24 bits) and splits them into four 6-bit values, each mapped to a character in the Base64 alphabet. If the input length is not a multiple of three, the output is padded with one or two = characters so decoders know how many bytes to expect. Decoding reverses the process: each Base64 character is converted back to its 6-bit value, the bits are reassembled into bytes, and any padding is stripped. This tool handles UTF-8 text correctly, so accented characters, emoji, and non-Latin scripts all encode and decode without data loss.
Data URIs. Base64 lets you embed images, fonts, or other binary assets directly inside HTML or CSS using data: URIs. This reduces the number of HTTP requests a page needs, which can speed up loading for small files. It is common practice for inline SVG icons and small PNG thumbnails.
Email attachments. The MIME standard uses Base64 to encode binary attachments so they can travel safely through email systems that only support 7-bit ASCII text. Every attachment you send — PDFs, images, archives — is Base64-encoded behind the scenes.
APIs and authentication. Many web APIs transmit binary data as Base64 strings inside JSON payloads, since JSON has no native binary type. HTTP Basic Authentication also Base64-encodes the username and password pair before sending it in a header. JWT tokens use a URL-safe variant of Base64 (Base64url) to encode their header and payload sections.
Storing binary in text formats. Databases, configuration files, and markup languages that only accept text can store small binary blobs — cryptographic keys, certificates, or hashes — as Base64 strings without corruption.
ectoplasma.org · Free tools for everyone.