Search code examples
base64

What is the advantage of using Base64 encoding?


What is the advantage of using Base64 encode?

I would like to understand it better. Do I really need it? Can't I simply use pure strings?

I heard that the encoding can be up to 30% larger than the original (at least for images).


Solution

  • Originally some protocols only allowed 7 bit, and sometimes only 6 bit, data.

    Base64 allows one to encode 8 bit data into 6 bits for transmission on those types of links.

    Email is an example of this.