Loading tool…
Convert any text to Base64 and back. Everything runs locally in your browser — your data is never uploaded to a server.
Loading tool…
Base64 is a free, private online tool that lets you encode text to Base64 or decode Base64 to text instantly in your browser. It runs entirely in your browser, so nothing you enter is uploaded to a server.
Privacy: this tool runs entirely in your browser. Your input is never sent to, received by, or stored on any server — there are no uploads and no tracking of what you enter.
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, + and /). It is widely used to embed images in CSS/HTML (data URIs), send binary attachments over text-only protocols like email (MIME), and store small blobs in JSON or XML.
Input bytes are grouped into 24-bit chunks (3 bytes), then split into four 6-bit values. Each 6-bit value maps to one Base64 character. When the input length isn't divisible by 3, one or two = padding characters are added so the output length is always a multiple of four.
Use Base64 when you need to move or store binary data through a text channel. Note that it is encoding, not encryption — it provides no security and is trivially reversible, as this tool demonstrates.
Base64 is a binary-to-text encoding, not a compression or encryption method. Computers store everything as bytes, but many systems — email, URLs, JSON, XML, HTTP headers — were designed to carry only printable text. Base64 solves this by re-expressing arbitrary bytes using just 64 safe ASCII characters: the uppercase letters A–Z, the lowercase letters a–z, the digits 0–9, and the two symbols + and /. Because every byte ends up as a printable character, binary data can travel safely through text-only channels.
The algorithm reads the input three bytes at a time. Three bytes are 24 bits, which divide evenly into four groups of six bits. Each 6-bit group (a value from 0 to 63) is mapped to one character in the Base64 alphabet. That is why Base64 output is always about one third larger than the input: every 3 bytes become 4 characters. When the final chunk has only one or two bytes, the output is padded with one or two = characters so the length stays a multiple of four. Decoding simply reverses this: groups of four characters are turned back into three bytes.
Base64 is everywhere in modern development. Data URIs embed small images or fonts directly in CSS/HTML (e.g. data:image/png;base64,iVBOR…), avoiding extra network requests. Email attachments use it via MIME. JSON Web Tokens Base64URL-encode their header and payload. HTTP Basic Auth Base64-encodes credentials. PEM certificates, API responses with binary blobs, and browser btoa()/atob() calls all rely on it.
The + and / characters have special meaning in URLs and filenames, so a variant called Base64URL replaces them with - and _, and often drops the = padding. This tool offers both: toggle URL-safe when the result must live in a query string, a path segment, a filename, or a JWT. Standard Base64 is correct for MIME, data URIs and most API payloads.
Because Base64 looks scrambled, people sometimes treat it as a way to hide secrets. It is not. There is no key and the transformation is completely reversible — anyone can decode it in seconds (this very page proves it). Never use Base64 to 'protect' passwords, tokens or personal data. For confidentiality you need real encryption such as AES; for integrity you need hashing or signatures. Base64's only job is safe transport of bytes as text.
Plain btoa() in browsers only handles Latin-1 and throws on characters like emoji or accented letters. This converter first encodes your text as UTF-8 bytes and then Base64-encodes those bytes, so any character — Chinese, Arabic, emoji — round-trips perfectly. On decode it reverses both steps. Everything happens locally in your browser, so even sensitive payloads never leave your device.