Text to Base64

Please input text values for conversion into base64.

Base 2


How to Convert Text to Base64

To convert text to Base64, you can follow a simple encoding process. Here's how you can do it:

Conversion Steps:

  1. Start with the text you want to encode. For example, let's use the text "Hello, World!".
  2. Convert the text to its corresponding ASCII values. You can find ASCII values for each character in the text.
    • "H" corresponds to 72, "e" to 101, "l" to 108, and so on.
  3. Convert the ASCII values to binary representations, ensuring they are 8 bits (1 byte) long. For example:
    • "H" is 72 in decimal, which is 01001000 in binary.
    • "e" is 101 in decimal, which is 01100101 in binary.
    • Continue this process for each character in the text.
  4. Group the binary values together to form a continuous string of bits.
    • The binary values for "Hello, World!" can be grouped to form: 01001000 01100101 01101100 01101100 01101111 00101100 00100000 01010111 01101111 01110010 01101100 01100100 00100001
  5. Divide the binary string into 6-bit groups, adding leading zeros if necessary, and convert each group to its decimal equivalent.
    • 010010 becomes 18 in decimal, 011001 becomes 25, and so on.
  6. Map the decimal values to the Base64 character set, which consists of 64 different characters.
    • 18 maps to "S", 25 to "Z", and so on.
  7. Concatenate the Base64 characters to form the Base64-encoded text.
    • Using the example text, "Hello, World!" is encoded as "SGVsbG8sIFdvcmxkIQ==".

That's it! You've successfully converted text to Base64.