Base64 Encode Decode – Convert Base64

Base64 encoder/decoder – Online converter tools, Encode/Decode strings to Base64 and vice versa with interactive Base64 encoding algorithm by ConvertCodes.

Text

    

Base64

Optional: Upload file to encode / decode Base64

  
    

Remark: Base64 Encode / Decode input box limit 10,000 Characters. For a large data, please convert by upload a file. Please select MIME types of decoding output file, the default is text/plain or .txt file.

Base64 is a kind of data encryption. Base64 transform and encode original data to text format. These encode data is unreadable by a human. The method of Base64 encoding is encoded to replacing the data with 64 ASCII characters (Text characters). That why we call its Base64 encode.

Example – Encode string “Convert” to Base64.

  1. Convert string to 8 binary digits (Refer: Table ASCII – Binary Character)
Convert = 01000011 01101111 01101110 01110110 01100101 01110010 01110100
LetterASCII CodeBinary
C06701000011
o11101101111
n11001101110
v11801110110
e10101100101
r11401110010
t11601110100

2.  Rearrange group of bits by start from the left-hand side to each of 6 bits/group. For the last group, If the number of digits did not fit at 6 bits, add additional “00” digits to complete at 6 bits also.

*** Remark: Additional “00” equal to “=” which it needs to add at the end of codes.

Before: 01000011 01101111 01101110 01110110 01100101 01110010 01110100

After : 010000 110110 111101 101110 011101 100110 010101 110010 011101 000000

3. Convert new groups of binary bits to decimal numbers and encode by Base64 mapping table.

BinaryDecimalBase64
01000016Q
110110542
111101619
10111046u
01110129d
10011038m
01010121v
11001050y
01110129d
0000000A

Then you have to concatenate Base64 encoding string on the table to complete the sequence. Do not forget the “0000” that you have been added to the last group, so you have to add “==” to the end of Base64 result also. 

Convert = "Q29udmVydA=="

Decoding Base64 data is to reverse the encoding Base64 process.

  1. Convert Base64 encoding data to binary 6 bits
  2. Rearrange 6 bits groups to 8 bits groups and ignore the last incomplete bits group.
  3. Convert binary 8 bits group back to ASCII.
LetterASCII CodeBinaryLetterASCII CodeBinary
a09701100001A06501000001
b09801100010B06601000010
c09901100011C06701000011
d10001100100D06801000100
e10101100101E06901000101
f10201100110F07001000110
g10301100111G07101000111
h10401101000H07201001000
i10501101001I07301001001
j10601101010J07401001010
k10701101011K07501001011
l10801101100L07601001100
m10901101101M07701001101
n11001101110N07801001110
o11101101111O07901001111
p11201110000P08001010000
q11301110001Q08101010001
r11401110010R08201010010
s11501110011S08301010011
t11601110100T08401010100
u11701110101U08501010101
v11801110110V08601010110
w11901110111W08701010111
x12001111000X08801011000
y12101111001Y08901011001
z12201111010Z09001011010
IndexChar IndexChar IndexChar IndexChar
0A16Q32g48w
1B17R33h49x
2C18S34i50y
3D19T35j51z
4E20U36k520
5F21V37l531
6G22W38m542
7H23X39n553
8I24Y40o564
9J25Z41p575
10K26a42q586
11L27b43r597
12M28c44s608
13N29d45t619
14O30e46u62+
15P31f47v63/

Variants summary table

Base64-history

Close Menu
%d bloggers like this:
Close Menu