How to use Base64 encoding/decoding?
- Enter your original text or Base64 code.
- Click the 'Encrypt' button to encode, or click the 'Decrypt' button to decode.
- Click the 'Copy' button to paste it into your clipboard.
- Click here to convert an image to Base64.
What is Base64 encoding/decoding?
- The online Base64 encoding/decoding tool is a utility that can encode/decode strings into Base64 format. It uses JavaScript for simplicity and speed.
- Base64 encoding converts three 8-bit bytes (3*8=24 bits) into four 6-bit bytes (4*6=24 bits), then prepends two zeros to each 6-bit byte to form an 8-bit byte. If the remaining characters are insufficient to form three bytes, they are padded with zeros, and the output characters become '='. Therefore, the encoded text may end with one or two '=' characters.
- To ensure readability of the output code, Base64 defines a standard character set for uniform conversion. This character set contains 2^6 = 64 characters, which is the origin of the name "Base64".
- This tool can be used to encrypt or decrypt Base64-formatted code. Base64 is one of the most commonly used encoding methods for transmitting 8-bit byte data on the Internet.
Base64 Encoding Table
The 64 printable characters include uppercase letters A-Z, lowercase letters a-z, digits 0-9 (totaling 62 characters), plus two additional characters: + and /.
| | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 |
| 000 | A | B | C | D | E | F | G | H |
| 001 | I | J | K | L | M | N | O | P |
| 010 | Q | R | S | T | U | V | W | X |
| 011 | Y | Z | a | b | c | d | e | f |
| 100 | g | h | i | j | k | l | m | n |
| 101 | o | p | q | r | s | t | u | v |
| 110 | w | x | y | z | 0 | 1 | 2 | 3 |
| 111 | 4 | 5 | 6 | 7 | 8 | 9 | + | / |