Start with how Base64 works if you are new to the encoding, or jump to Base64 errors if something is already broken. For quick lookups there is the alphabet table and the glossary.
- base64hub
- Learn Base64
Learn Base64
How Base64 works, where it is used and what to do when decoding fails. Each article comes with tested examples and links to the matching tools.
3→4ExplainerHow Base64 worksHow Base64 turns 3 bytes into 4 characters: 6-bit groups, the 64-character alphabet and = padding, with worked examples for Man, Ma and M, and where it is used.==ExplainerPadding (=)Why Base64 ends in = or ==, when padding is optional, which decoders reject missing padding, how to restore it from length mod 4, and non-canonical encodings.-_GuideBase64 vs Base64URLBase64URL swaps + and / for - and _ and usually drops padding. RFC 4648 §4 vs §5, where each variant is used, how to convert, and bugs with + becoming a space.!=SecurityEncoding vs encryptionBase64 hides nothing: anyone can decode it without a key. How Basic Auth, Kubernetes Secrets and JWT payloads leak, and what to use instead: AES-GCM, Argon2.IMGPerformanceData URI performanceMeasured: how gzip and Brotli shrink Base64 data URIs for PNG, JPEG, WOFF2 and SVG, plus caching, render blocking, CSP data: rules and when inlining pays.33%ReferenceSize overheadBase64 output is 4 × ceil(n / 3) characters. The exact formula with padding and MIME line breaks, a size table, why it is 33% and what compression does.@GuideBase64 in emailHow email uses Base64: base64 vs quoted-printable transfer encoding, 76-character lines, attachments, =?UTF-8?B?...?= headers and extracting files from .eml.vsExplainerBase64 vs other encodingsBase64, hex, Base32, Base58, Ascii85, Z85 and Base45 side by side: alphabets, size overhead, case and URL safety, and the same 12 bytes encoded in each.iVBReferenceCommon Base64 prefixesWhat iVBORw0KGgo, /9j/, JVBERi0, UEsDB, H4sI, eyJ and MII mean: a table of Base64 prefixes for PNG, JPEG, PDF, ZIP, gzip, JSON, certificates and more.ERRTroubleshootingBase64 errorsFix Base64 decode errors: Incorrect padding, Invalid character, atob not correctly encoded, Java Illegal base64 character, garbled text and double encoding.u8GuideUint8Array.toBase64()Uint8Array.toBase64, fromBase64, setFromBase64, toHex and fromHex explained: options, lastChunkHandling, browser and Node.js support, and a fallback.JWTExplainerBase64 in JWTHow JSON Web Tokens use Base64URL without padding, how to decode the header and payload by hand in JS, Python and bash, and the mistakes that break tokens.RFCReferenceBase64 standards and RFCsThe history of Base64 in RFCs: PEM (RFC 989, 1421), MIME (RFC 2045), RFC 3548 and 4648, JWS base64url, IMAP modified UTF-7, OpenPGP armor and variants.