

You can also Base64 encode computer code to transmit it over HTTP.
#WEB BASE64 ENCODING PDF#
An example of this is uploading your resume as a PDF to an employer’s website. To prevent data corruption, you can Base64 encode images, audio, and other binary file formats to send the data as part of a HTTP GET request or HTML form. The most common case is sending binary data over HTTP. There are a couple of reasons you might want to encode binary data into Base64, some good and some not so good. By splitting the ASCII binary representation of “one” into six bit chunks and using the Base64 look-up table, we can get the Base64 representation of the ASCII word “one” as “b25l”. Base64 encodes binary data with six bits instead of eight, according to the values in this Base64 look-up table. The translation of each character into its eight bit binary representation is defined by the ASCII table. ASCII represents characters with eight bits (for a total of 2⁸ = 256 possible values), so the ASCII encoded word “one” is represented as: "o" "n" "e" 01101111 01101110 01100101 ASCII is an encoding scheme for representing text data in a computer system. However, before we do that, let’s discuss ASCII. But how do we convert bits to Base64? Understanding how this is done requires some explanation of how binary data is represented.Īs an example, let’s take the word “one” and how it can be represented as Base64. The values are made up of uppercase and lowercase letters, numbers 0 through 9, as well as the “+” and “/” signs. This means there are six bits for representing a single Base64 character (2⁶ = 64).

The name comes from the fact that Base64 uses 64 possible values for representing binary data. What is Base64?īase64 is a frequently used and reliable method of representing arbitrary binary data as text. If you’re looking for a simplified explanation, you’ve come to the right place. You might have asked yourself “What is this?”, and more importantly, “What is this used for?” Googling for an answer gives highly technical explanations involving radix-64 and RFC 4648. If you’ve seen examples of Base64 text, it looks like gibberish. If you are in web development, data engineering, or cybersecurity, you might have heard of Base64.
