Base64 Encoder & Decoder encode or decode data to Base64 format and back.


1Source
2 Input Paste below OR OR OR 0
×

×

3 Parameters
4 Function
5 Output 0
×

What is Base 64?


Base64 is an encoding scheme that is used to represent binary data in an ASCII string format by translating it into a radix-64 representation.

The particular set of 64 characters chosen to represent the 64 place-values for the base varies between implementations.
Base64 implementation uses A–Z, a–z, and 0–9 for the first 62 values. The 63rd character is + and 64th char is /. The character = is used as padding character.

For encoding, the each byte of data is converted into binary representation. Now the binary representation is grouped in sextets (6 bit each). Each of the 6 bits is converted back to a decimal representation. For each of decimal value, the associated ASCII character is picked. The padding characters might be added to make the last encoded block contain four Base64 characters.

Base64 is designed to carry data stored in binary formats across channels that only reliably support text content. Base64 is particularly to embed image files or other binary assets inside textual assets such as HTML and CSS files.

Conversion

The following table illustrates how an input data is converted to base64.

For example the base-64 encoding for the word "Cat".

C a t
ASCII coded decimal 67 97 116
ASCII coded binary 01000011 01100001 01110100
Join 3 bytes into a 24-bit string 010000110110000101110100
Create group of 6 bits 010000    110110    000101    110100
Convert binary to decimal 16,     54,     5,     52
Base-64 encoded Q2F0


Using the Base64 Encoder Tool


Using this tool very straightforward simply enter the input data(text or binary) and press the Encode or Decode button to encode or decode the input data.

Encoding data as Base64

  • For encoding data text enter the binary or textual data by using one of the following ways:
    1. Simply paste the data in the input box.
    2. Upload data from local file.
    3. Load data from a remote location, specify the URL.
    4. For loading the test data, press the "Load Sample" button.
  • Choose the Operation as "Encode".
  • Finally, press the "Encode" button to instantly encode the input data to Base64 format.
  • That's it, simply download the encoded data "Download as File" to download or press on the "Copy to Clipboard" button.

Decoding Base64 Encoded Data

  • For encoding data text enter the encoded data by using one of the following ways:
    1. Simply paste the data in the input box.
    2. Upload data from local file.
    3. Load data from a remote location, specify the URL.
  • Choose the Operation as "Decode".
  • Finally, press the "Decode" button to instantly decode the input data in Base64 format to original text data.
  • That's it, simply click on "Download as File" to download or press on the "Copy to Clipboard" button.

Tips

  • Turn on Live encoding ON if you like to view the output as you change the input in real-time
  • Press "Reset" button select all the default tool options and clear the input.

Loading Please Wait...