Do not count last null character .
len_str -= 1 ; document . write ( " " + ( encoded_String ) . join ( " " ) + " " ) ; document . write ( " " + base64Decoder ( encoded_String , len_str ) . join ( " " ) + " " ) ;