Online Base64 encoding and decoding
This tool can encrypt all characters that can be represented by utf-8 by Base64 encoding, and can also
restore the characters after Base64 encryption.
Base64 encoding requires that 3 8-bit bytes (3*8=24) be converted into 4 6-bit bytes (4*6=24), and then two 0s are added in front of the 6 bits to form an 8-bit word section form. If the remaining characters are less than 3 bytes, it is padded with 0 and the output character is '=', so 1 or 2 '=' may appear at the end of the encoded output text.
In order to ensure that the output encoding is readable characters, Base64 has developed an encoding table for uniform conversion. The size of the encoding table is 2^6=64, which is where the name Base64 comes from.
code value | character | code value | character | code value | character | code value | character | code value | character | code value | character | code value | character | code value | character |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | A | 8 | I | 16 | Q | twenty four | Y | 32 | g | 40 | o | 48 | w | 56 | 4 |
1 | B | 9 | J | 17 | R | 25 | Z | 33 | h | 41 | p | 49 | x | 57 | 5 |
2 | C | 10 | K | 18 | S | 26 | a | 34 | i | 42 | q | 50 | y | 58 | 6 |
3 | D | 11 | L | 19 | T | 27 | b | 35 | j | 43 | r | 51 | z | 59 | 7 |
4 | E | 12 | M | 20 | U | 28 | c | 36 | k | 44 | s | 52 | 0 | 60 | 8 |
5 | F | 13 | N | twenty one | V | 29 | d | 37 | l | 45 | t | 53 | 1 | 61 | 9 |
6 | G | 14 | O | twenty two | W | 30 | e | 38 | m | 46 | u | 54 | 2 | 62 | + |
7 | H | 15 | P | twenty three | X | 31 | f | 39 | n | 47 | v | 55 | 3 | 63 | / |