Base64URL and Base64
The same bytes in both alphabets, with the padding accounted for.
Paste either alphabet — which one it is gets worked out and both forms come back.
Result
Good to know
- The two alphabets differ in exactly two characters: + becomes - and / becomes _. Everything else, including the order of the other 62, is identical.
- Base64URL drops the = padding, because = has to be percent-encoded in a query string. The padding carries no information — it can always be worked back out from the length.
- A length that leaves a remainder of one when divided by four cannot be Base64 at all: no number of bytes produces it.
- This is the conversion a JWT needs: its three parts are Base64URL, which is why they carry no equals signs.
25 views