Base64 padding explained: why = appears and how to fix padding errors
The = at the end of a base64 string is padding. Base64 turns every 3 bytes of input into 4 characters, and when the input length isn't a multiple of 3 the last group comes up short. One leftover byte becomes two characters plus ==. Two leftover bytes become three characters plus …