Base64 Encode Decode

Any problem with this tool? Please Contact: techwelkin AT gmail DOT com

What is Base64?

In simple terms, Base64 is an encoding scheme that can render text data unreadable. It is a method for encoding binary data, such as images, audio, or other types of files, into ASCII characters. It's commonly used in various applications, including email attachments, data transmission over the internet, and storing binary data in text-based formats like XML or JSON.

Base64 encoding is not encryption; it's simply a method for representing binary data using ASCII characters. It's often used to ensure that binary data remains intact when transmitted across systems that may not support binary data directly.

Working of Base64 Encoding

Let's assume we want to convert the Hello string into Base64

When we convert the string into binary, we get:

01001000 01100101 01101100 01101100 01101111

Now because Base64 digit represents 6 bits of data, let's group the above binary data into groups of 6 bits each:

010010 000110 010101 101100 011011 000110 110011 011011 011011 011011 000110 1111

Convert each of these 6 bits group into its corresponding Base64 character using the Base64 encoding table. The table is given in the next section.

  • 010010 = S
  • 000110 = G
  • 010101 = V
  • 101100 = u
  • 011011 = 3
  • 000110 = G
  • 110011 = z
  • 011011 = 3
  • 011011 = 3
  • 011011 = 3
  • 000110 = G
  • 1111 = /

In Base64 empty octets are padded with = mark. The last group has only 4 bits, so it will be padded with == to complete the 6 bits and fill the empty places.

In the end, we get that Hello is equal to SGVsbG8= in Base64 encoding

Base64 as Encryption Method

Base64 encoding is not a very strong security measure because decoding it is very easy. As it is with encoding, TechWelkin Base64 Decoder can easily decode Base64 and break encryption. Therefore, this method should not be used if stakes are high. It can be used just to obfuscate ordinary text.

Base64 Table

Base64 and corresponding binary table.
IndexBinaryBase64
0000000A
1000001B
2000010C
3000011D
4000100E
5000101F
6000110G
7000111H
8001000I
9001001J
10001010K
11001011L
12001100M
13001101N
14001110O
15001111P
16010000Q
17010001R
18010010S
19010011T
20010100U
21010101V
22010110W
23010111X
24011000Y
25011001Z
26011010a
27011011b
28011100c
29011101d
30011110e
31011111f
32100000g
33100001h
34100010i
35100011j
36100100k
37100101l
38100110m
39100111n
40101000o
41101001p
42101010q
43101011r
44101100s
45101101t
46101110u
47101111v
48110000w
49110001x
50110010y
51110011z
521101000
531101011
541101102
551101113
561110004
571110015
581110106
591110117
601111008
611111019
62111110+
63111111/
padding=