Binary to Base64 Converter
Convert binary bytes into Base64 online. Enter binary digits or ordinary text, encode the data, and decode Base64 back into binary or readable UTF-8 text. View byte values, copy results, and explore how Base64 works.
Binary to Base64 Calculator
Choose an operation, enter your data and click Convert. The result appears below without reloading the page.
Conversion Results
The result of your conversion is shown below.
Base64 Output
Byte Details
Each byte is shown as a decimal value, hexadecimal byte and eight-bit binary number.
| Byte # | Decimal | Hexadecimal | Binary |
|---|
Binary to Base64 Examples
Choose an example to load it into the converter.
What Is Binary to Base64 Conversion?
Binary represents information using two digits, 0 and
1. Base64 is an encoding scheme that represents arbitrary
bytes as text using 64 primary characters: uppercase letters,
lowercase letters, digits, plus and slash in the standard alphabet.
The equals sign may be used for padding.
Base64 is useful when binary data needs to be carried in text-oriented formats such as JSON, email messages or data URLs. It does not encrypt information and does not provide confidentiality.
How Does the Converter Work?
- Binary bytes: The input is split into groups of eight bits.
- Byte values: Each group is interpreted as a number from 0 to 255.
- Base64 encoding: The bytes are encoded into Base64 using the selected alphabet.
- Decoding: Base64 input can be converted back to its original bytes.
- Text decoding: If the bytes contain valid UTF-8 text, the tool can display the decoded text.
01001000 01101001 encode
to SGk=.
Binary to Base64 Conversion Example
| Character | Decimal byte | Binary | Base64 |
|---|---|---|---|
H |
72 | 01001000 |
SGk= |
i |
105 | 01101001 |
The bytes for H and i are 72 and 105.
Base64 combines groups of bytes into six-bit indices in its alphabet.
Since two bytes do not fill a complete three-byte group, the standard
Base64 representation uses padding: SGk=.
Standard Base64 vs URL-Safe Base64
Standard Base64 uses + and / as two of its
alphabet characters. URL-safe Base64 substitutes - and
_, making the alphabet more convenient in URLs and
filenames. Padding with = may be retained or omitted
depending on the application.
This converter lets you choose between the standard and URL-safe alphabets. When decoding, it accepts either alphabet and optional valid padding.
Frequently Asked Questions
1. What does a binary to Base64 converter do?
It interprets binary input as bytes and encodes those bytes as Base64 text. It can also decode Base64 back into the original bytes.
2. Can I convert text directly to Base64?
Yes. Choose UTF-8 text mode. The text is encoded as UTF-8 bytes first, then those bytes are converted to Base64.
3. Why does Base64 output sometimes end in equals signs?
Base64 represents three input bytes using four output characters. If the final group contains fewer than three bytes, one or two equals signs can be used as padding.
4. Is Base64 encryption?
No. Base64 is encoding, not encryption. It can be decoded by anyone, so do not use it to protect passwords or confidential data.
5. Can I convert Unicode text such as emoji?
Yes. Text mode uses UTF-8, so Unicode text is converted to bytes before Base64 encoding. When decoding text, the bytes must form valid UTF-8 to be displayed as text.
6. Is my data sent to the server?
No. The encoding and decoding operations run locally in your browser. The page does not submit the input to the PHP server.
Related Binary Converters and Calculators
Explore more number-system converters and binary logic tools.
Visit the Binarios.org homepage for more binary tools, or see About Us for information about the site.