Binary to Base64 Converter
ED-53Paste binary written as 8-bit groups such as 01001000 01100101 and get the Base64 of those bytes. Base64 back to binary works too.
Runs in your browser. Nothing is uploaded.
Binary bytes (8 bits each) or Base64
Result
How to use it
- Paste your binary into the input box. Separate bytes with spaces, commas or line breaks, or paste one unbroken run.
- Pick the standard or URL-safe alphabet and decide whether to keep the = padding.
- Click Binary to Base64.
- To go back, paste Base64, choose the separator you want and click Base64 to binary.
Bytes, not characters
Every group of 8 bits is one byte, and the converter encodes those bytes directly. It does not read the bits as text first. So the single byte 01001000 gives SA==, which is the Base64 of the byte 0x48, and five bytes for the letters in Hello give SGVsbG8=. That is the same answer you get by encoding the word Hello, because those bytes are its ASCII form.
Input rules
Groups can be split by spaces, commas or line breaks, or run together if the total length is a multiple of 8. A 0b prefix on a group is allowed. A group with 7 or 9 bits is an error that names the group; the tool never adds leading zeros for you, because that would change the value. Digits other than 0 and 1 are rejected with their position.
Going the other way
Base64 to binary reads standard or URL-safe Base64, with or without padding, and prints each byte as 8 bits, joined by a space, a comma or a line break. Whether those bits spell readable text depends on what the Base64 holds. Binary of an image, for example, is just a long list of bytes.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
is not a binary digit | A character other than 0 or 1 appears in a group. | Remove spaces inside a byte, letters or other symbols. |
bits. Each byte is 8 bits | A group is not exactly 8 bits long (or a multiple of 8 in a run). | Pad the group with leading zeros or fix the missing digit. |
No binary digits found | The input is empty or only whitespace. | Paste bytes such as 01001000 01101001. |
Questions people ask
How do I convert binary to Base64?
Paste the binary as 8-bit groups and click Binary to Base64. The tool turns each group into a byte and writes all the bytes with the Base64 alphabet. Choose URL-safe or padding options first if you need them.
Why is my binary rejected?
Each byte must be exactly 8 bits, with only 0 and 1. A group of 7 bits, a stray letter or a space inside a byte causes an error, and the message points to the group so you can fix it.
Is converting binary to Base64 the same as encoding the text?
Only when the bits are the ASCII or UTF-8 bytes of that text. This tool encodes the bytes as given. If your bits are the UTF-8 bytes of Hello, the output matches the Base64 of the word Hello.
How do I convert Base64 back to binary?
Paste the Base64 and click Base64 to binary. Each decoded byte is printed as 8 bits. You can choose a space, a comma or a new line between bytes, which helps when you copy the bits into code.
Can I paste binary without spaces?
Yes. A single unbroken run of 0 and 1 works if its length is a multiple of 8. The tool cuts it into 8-bit bytes from the left. If the length is off by even one bit it stops with an error.
What does the URL-safe option change?
It writes - and _ instead of + and / in the result. Use it when the string goes into a URL or a token. You can also switch off the = padding, which URL-safe Base64 usually omits.
About this tool
Each group of 8 bits is one byte, and the bytes are written as Base64. Groups can be separated by spaces, commas or line breaks, or run together in one string whose length is a multiple of 8; a leading 0b is allowed. A group that is not 8 bits long is an error that names it, so the tool never pads or guesses. It does not treat the bits as text characters: the bytes go straight to Base64, so 01001000 gives SA==, the Base64 of the single byte 0x48. Base64 to binary reads standard or URL-safe Base64, with or without padding, and writes every byte as 8 bits.