Base64 encode & decode with UTF-8 support
Base64 is an ASCII encoding that turns arbitrary binary data into a text-safe string of 64 printable characters. It's used in HTTP Basic auth headers, data URIs, JWT segments, email attachments (MIME), and anywhere binary bytes need to travel through a text-only channel without corruption.
This tool encodes any UTF-8 text to Base64 and decodes Base64 back to text. Encoding and decoding both run in your browser using the native TextEncoder / TextDecoder + btoa / atob APIs — your input never reaches a server.
Hello, World!SGVsbG8sIFdvcmxkIQ==你好,世界 🌍5L2g5aW977yM5LiW55WMIPCfjI0=dG9vbGNvenkuY29ttoolcozy.comNo. Base64 is encoding, not encryption. Anyone can decode a Base64 string back to its original bytes instantly. Never use Base64 to hide passwords, tokens, or any sensitive data — use proper encryption (AES, etc.) for that.
Two common causes: (1) the string isn't valid Base64 (wrong characters or missing padding), or (2) the original bytes weren't UTF-8 text — for example, an encoded image or PDF. This decoder assumes the result should be human-readable text.
Base64 represents 3 bytes of input as 4 ASCII characters, so encoded output is roughly 33% larger than the original. That's the cost of making binary safe for text-only transports.
This tool uses standard Base64 (with + / =). For URL-safe variants used in JWT and similar formats, replace + with -, / with _, and strip = padding manually — or use the JWT decoder which handles base64url internally.
No hard limit, but very large inputs (tens of MB) may freeze the browser briefly during encoding. For files of that size, dedicated CLI tools or streaming encoders are more appropriate.