How Base64 works
Every three bytes become four characters from a 64-character alphabet, so the output is about a third larger. When the input length is not a multiple of three, = signs pad the end. URL-safe Base64 swaps + and / for - and _ so the value can sit in a link.