What is Base64 Encoding/Decoding?
Base64 is an encoding scheme that represents binary data using 64 printable ASCII characters. It's widely used for email attachments (MIME), embedding data in web pages via Data URIs, HTTP Basic authentication, and JWT tokens. This tool performs real-time conversion entirely in your browser — your data is never sent to any server.
Fixing Garbled Text (Mojibake)
If decoded text appears garbled, the original data may have been encoded with a character set other than UTF-8 (such as Shift-JIS or EUC-JP). Use the encoding selector in this tool to specify the correct character encoding. Legacy Japanese systems often use Shift-JIS.
URL-safe Base64 (Base64URL)
Standard Base64 uses '+', '/', and '=' characters, which have special meanings in URLs and filenames. URL-safe Base64 (RFC 4648 §5) replaces '+' with '-', '/' with '_', and removes the padding '='. It's commonly used in JWT tokens and OAuth authentication.
Frequently Asked Questions
- What is Base64?
- Base64 is an encoding scheme that represents binary data using 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). It's commonly used for email attachments (MIME), Data URIs, HTTP Basic authentication, and JWT tokens — anywhere binary data needs to be transmitted as text.
- Is Base64 encryption?
- No. Base64 is an encoding, not encryption. Anyone can decode Base64 back to the original data. It should never be used to protect passwords or sensitive information. Use proper encryption (e.g., AES) for security purposes.
- How does Base64 affect data size?
- Base64 encoding increases data size by approximately 33% (4/3 ratio). This is because every 3 bytes of input are converted to 4 Base64 characters. This tool displays the size ratio in real-time as you encode.