Text to Encode
Base64 Output
Standard Base64 encoded with UTF-8 support
About Base64 Encoding
What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data as an ASCII string. It uses 64 characters (A-Z, a-z, 0-9, +, /) plus = for padding. It's commonly used to embed data in text-based formats like JSON, XML, or HTML.
URL-safe Base64
URL-safe Base64 replaces + with - and / with _, and omits padding = characters. This variant is safe to use directly in URLs and filenames without additional percent-encoding.
Common Use Cases
- Embedding data in JSON or XML
- Encoding email attachments (MIME)
- Data URIs in HTML/CSS
- Storing binary data in text fields
- HTTP Basic Authentication headers
UTF-8 Support
This tool uses TextEncoder and TextDecoder to properly handle multi-byte UTF-8 characters (emoji, CJK characters, accented letters, etc.) that the native btoa() and atob() functions cannot handle alone.