Base64 Encode Decode
This site provides Base64 encoding/Base64 decoding conversion tools. If you enter the string you want to convert to Base64, it will be automatically encoded to Base64. Also, if you enter Base64, it will be decoded automatically.
Base64 encode |
|
---|---|
Base64 decode |
|
---|---|
What is Base64?
Base64 is a conversion method that expresses all data as a combination of 64 characters (a-z), A-Z, 0-9, +, and /, and = (total of 65 characters). Base64 is used to transmit binary data to applications and programs that can only handle text format.
It is often used in email attachments (MIME). Previously, only alphanumeric characters expressed in 7 bits called ASCII could be sent by email, but with the emergence of a standard called MIME (Multipurpose Internet Mail Extensions), which expresses all data as alphanumeric characters, it became possible to send and receive images, audio, and other data via email. One of the methods used is a data conversion method called "Base64".
Currently, it is used for a wide range of purposes, such as encoding image data in Base64 so that it does not contain special characters in JSON, and embedding images encoded in Base64 directly into html to reduce the number of requests when displaying a web page.
How to use (encoding)
- Enter the string you want to encode into Base64.
- The automatically encoded Base64 is displayed.
- The converted Base64 is displayed, so you can copy and download it.
How to use (decoding)
- Enter the Base64 you want to decode.
- The automatically decoded string is displayed.
- The converted Base64 is displayed, so you can copy and download it.
Base64 conversion procedure
- String to convertabcdefg
- Convert the string to be changed to binary (base 2)0110 0001, 0110 0010, 0110 0011, 0110 0100, 0110 0101, 0110 0110, 0110 0111
- Divide binary into 6-bit chunks011000, 010110, 001001, 100011, 011001, 000110, 010101, 100110, 011001, 11
- The last 2 bits are left over, so add "0" to make it "6 bits"011000, 010110, 001001, 100011, 011001, 000110, 010101, 100110, 011001, 110000
- Convert bits to characters using conversion tableY W J j Z G V m Z w
- Divate into "4 characters"YWJj ZGVm Zw
- Add "=" to the missing 2 charactersYWJj ZGVm Zw==
- Base64 stringYWJjZGVmZw==
Base64 bit string and alphanumeric conversion table
Decimal | Binary | Base64 |
---|---|---|
0 | 0 | A |
1 | 1 | B |
2 | 10 | C |
3 | 11 | D |
4 | 100 | E |
5 | 101 | F |
6 | 110 | G |
7 | 111 | H |
8 | 1000 | I |
9 | 1001 | J |
10 | 1010 | K |
11 | 1011 | L |
12 | 1100 | M |
13 | 1101 | N |
14 | 1110 | O |
15 | 1111 | P |
16 | 10000 | Q |
17 | 10001 | R |
18 | 10010 | S |
19 | 10011 | T |
20 | 10100 | U |
21 | 10101 | V |
22 | 10110 | W |
23 | 10111 | X |
24 | 11000 | Y |
25 | 11001 | Z |
26 | 11010 | a |
27 | 11011 | b |
28 | 11100 | c |
29 | 11101 | d |
30 | 11110 | e |
31 | 11111 | f |
32 | 100000 | g |
33 | 100001 | h |
34 | 100010 | i |
35 | 100011 | j |
36 | 100100 | k |
37 | 100101 | l |
38 | 100110 | m |
39 | 100111 | n |
40 | 101000 | o |
41 | 101001 | p |
42 | 101010 | q |
43 | 101011 | r |
44 | 101100 | s |
45 | 101101 | t |
46 | 101110 | u |
47 | 101111 | v |
48 | 110000 | w |
49 | 110001 | x |
50 | 110010 | y |
51 | 110011 | z |
52 | 110100 | 0 |
53 | 110101 | 1 |
54 | 110110 | 2 |
55 | 110111 | 3 |
56 | 111000 | 4 |
57 | 111001 | 5 |
58 | 111010 | 6 |
59 | 111011 | 7 |
60 | 111100 | 8 |
61 | 111101 | 9 |
62 | 111110 | + |
63 | 111111 | / |
Notes
This tool is available for free.
※This program is created and confirm the operation in PHP8.1.22.
※If you have any inquiries, opinions, or requests that you would like to make,
please fill out the following form