Base64 is an encoding scheme that converts binary data into an ASCII string. It uses 64 printable characters (A-Z, a-z, 0-9, +, /) plus the padding character "=". This encoding is essential for email attachments (MIME), data URLs in HTML/CSS, JSON Web Tokens (JWT), and API authentication.
The algorithm divides input into 3-byte blocks (24 bits) and converts them into 4 Base64 characters. Each character represents 6 bits.
No! Base64 is encoding, not encryption. Anyone can decode Base64. It provides no security – use it only for data transfer, not for protecting sensitive information.
The "=" is padding. Base64 works with 3-byte blocks. When input isn't divisible by 3, it's padded: 1 byte remainder → "==", 2 byte remainder → "=".
A URL-safe variant that replaces "+" with "-" and "/" with "_". Used for JWT tokens and URLs, since +, / and = have special meanings in URLs.
Encode: btoa("Text") | Decode: atob("VGV4dA==") | For UTF-8: btoa(unescape(encodeURIComponent(text))) and decodeURIComponent(escape(atob(encoded)))
💡 Tip: Embedding small images (<10KB) as Data URLs saves HTTP requests. For larger files, the 33% overhead outweighs benefits – use normal URLs instead.
Der Body Mass Index ist eine Orientierungshilfe. Er setzt dein Gewicht ins Verhltnis zu deiner Krpergre.