Free Online Base64 Encoder/Decoder
Encode text to Base64 or decode Base64 back to text, instantly. Full Unicode support for emoji, Chinese, Japanese, and any language — plain browser btoa() breaks on these, this tool doesn't. 100% in your browser, nothing uploaded.
What Is Base64 Encoding?
Base64 is a way of representing any data — text or binary — using only 64 printable ASCII characters (A–Z, a–z, 0–9, +, /), with = used for padding. It exists because many systems — email protocols, JSON documents, URLs, older text-only transports — were built to handle plain text reliably, but choke on raw binary bytes. Base64 converts that binary (or Unicode text) into a safe, text-only representation that any of those systems can carry without corruption. It's important to know that Base64 is not compression and not encryption — it's just a different way of writing the same data, and it makes the output about 33% larger than the original.
When Do You Need Base64?
Base64 shows up constantly in web development: embedding small images directly inside HTML or CSS as data URIs (data:image/png;base64,...) so the browser doesn't need a separate file request; email MIME encoding, which Base64-encodes attachments and non-ASCII message bodies so they survive transport through mail servers that only guarantee 7-bit ASCII delivery; the header and payload segments of JWT (JSON Web Token) authentication tokens, which are Base64URL-encoded JSON objects; HTTP Basic Auth headers, which Base64-encode the username:password pair; and embedding raw binary data (like a small file or a cryptographic key) inside a JSON or XML document that only supports text values.
Base64 编码解码工具
这是一个免费的在线 Base64 编码/解码工具,完整支持 Unicode 字符(表情符号、中文、日文等),而浏览器原生的 btoa() 函数在处理非拉丁字符时会报错。所有编码解码均在浏览器本地完成,不会上传或存储任何数据,适合处理 Data URI 图片嵌入、邮件 MIME 附件、JWT 令牌等场景。请注意:Base64 编码不是加密,不提供任何安全性。