Base64 Encoder & Decoder Online

What Is Base64?

Base64 is an encoding scheme that converts binary data into a string of 64 ASCII characters (A–Z, a–z, 0–9, +, /). The name comes from the alphabet size: 64 characters, each representing 6 bits, so every 3 bytes of input become 4 characters of output — roughly a 33% size increase.

Base64 is not encryption. It's a reversible encoding — anyone who knows it's Base64 can decode it instantly. Its purpose is interoperability: turning arbitrary binary into text-safe characters that survive transmission over protocols designed for ASCII.

📦 Where Base64 Is Used

🔀 Base64 vs Base64URL

Standard Base64 uses + and /, which have special meaning in URLs. Base64URL replaces them with - and _, and omits the padding = sign. Always use Base64URL for JWTs, OAuth tokens, and anything that ends up in a URL or cookie.

🌐 UTF-8 and Multibyte Characters

The browser's native btoa() function only handles ASCII (byte values 0–255). To encode Unicode text (emojis, CJK, accented characters), the string must first be UTF-8 encoded. This tool handles that automatically — you can paste any text and get the correct Base64 output.

Encoding runs entirely in your browser. Your data is never sent to any server.

Related Tools

>