Base64 Encode and Decode Online

Convert from text to Base64 or decode Base64 to text.

About Base64 Encoder and Decoder

  • String to Base64 encoding
  • Base64 to String decoding
  • Instant Base64 conversion
  • Copy function to re-use the generated hash

What is Base64 Encoder and Decoder?

Base64 Encoder and Decoer is an online tool that provides a real-time mechanism to convert a text or a string to the popular Base64 encoding format, as well as converting any Base64 value into ASCII text. In this way, you can easily encode and decode Base64 related values, analyze the outputs and transform your data in the desired format, using the standard approach to transmit data over the Internet.

How does Base64 encoding work?

To encode text to Base64, follow the next steps:

  1. Select the input string (Example: 'Yes')
  2. Get the ASCII to Binary conversion for each input character (Example: Y=01011001, e=01100101, s=01110011)
  3. Join all the binary numbers on a single number (Example: 010110010110010101110011)
  4. Split the binary number into groups of 6 applying padding zeros if needed (Example: 010110, 010110, 010101, 110011)
  5. Convert each 6-bit group into decimal numbers, from 0 to 63 (Example: 010110=23, 010110=23, 010101=21, 110011=51)
  6. Convert each decimal number into a char by using the Base64 encoding table to get the output (Example: Yes -> WWVz)

How to decode Base64?

Base64 decoding process starts with converting the Base64 characters into 6-bit numbers from decimal (0 to 63). After conversion, the binary numbers are joined and divided in groups of eight bits. Finally, each 8-bit group must be converted into ASCII characters to get the decoded output. Example: WWV in base64 = Yes in string.

What is Base64 used for?

Base64 is mainly used to encode binary data into ASCII and send information throughout a network. The most popular uses of base64 data are transmission of encoded images, css files, xml files, json data, urls, email attachments, QR code content, and more.