How to decode Base64 to original String?

How to encode messages in base64?

  • I was on Twitter and one of the users I am following posted a message for people to decode. I figured out that it was encoded in base64 but I am clueless on decoding/encoding these messages. Can anyone show me how to encode a message into base64 and then decode it properly? Say the message "This is in base64"

  • Answer:

    You know that base64 encoding 6 bits groups are taken some symbol is assigned based on the 6 bit value. If 000000 then A, 000001 then B and vice versa. Reverse also is carried out in the same fashion. If the received base64 string contains A then in its place 000000 is taken and then the whole thing is converted to ASCII string

Docere Suess at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

lxuser@ubuntu:/tmp$ echo "This is in base64" | base64 VGhpcyBpcyBpbiBiYXNlNjQK lxuser@ubuntu:/tmp$ echo VGhpcyBpcyBpbiBiYXNlNjQK | base64 -d This is in base64

John H

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.