radixflip

Text to Binary Converter

Type any text — a name, word, or sentence — and get binary instantly. Name to binary is the same tool: a name is just text. Each character becomes its code, then binary.

Convert Text to Binary

"Hi" in binary: 1001000 1101001₂
CharacterASCIIBinary₂

Full converter (all five bases) →  ·  Binary addition calculator →

How to convert text to binary

  1. Take one character. Take the first character, for example H in "Hi".
  2. Find its code. Every character has a code: H is 72, i is 105, A is 65, space is 32.
  3. Convert the code to binary. 72 = 1001000, 105 = 1101001, 65 = 1000001.
  4. Join with spaces. Join the binary groups with spaces. "Hi" becomes "1001000 1101001".

Worked examples

"Hi" → "1001000 1101001". H is 72 = 1001000, i is 105 = 1101001.

"Ana" → "1000001 1101110 1100001". A is 65 = 1000001, n is 110 = 1101110, a is 97 = 1100001. This is the same name-to-binary conversion — just text to binary applied to a name.

Padding note: RadixFlip shows minimal binary with no leading zeros: A = 1000001. With 8-bit padding the same value is written 01000001. Both mean 65.

Common characters in binary

CharacterASCIIBinary₂CharacterASCIIBinary₂
space32100000a971100001
048110000b981100010
149110001c991100011
A651000001H721001000
B661000010i1051101001
C671000011n1101101110

How to convert text to binary in code

Python

def text_to_binary(text):
    return " ".join(format(ord(c), "b") for c in text)

print(text_to_binary("Hi"))   # 1001000 1101001
print(text_to_binary("Ana"))  # 1000001 1101110 1100001
# 8-bit padded: " ".join(format(ord(c), "08b") for c in text)

Java

// Minimal binary, one group per character
String textToBinary(String text) {
    StringBuilder out = new StringBuilder();
    for (int i = 0; i < text.length(); i++) {
        if (i > 0) out.append(" ");
        out.append(Integer.toBinaryString(text.charAt(i)));
    }
    return out.toString();
}
// textToBinary("Hi") → "1001000 1101001"

C

#include <stdio.h>
#include <string.h>

void printBinary(int n) {
    if (n == 0) { printf("0"); return; }
    char bits[32]; int i = 0;
    while (n > 0) { bits[i++] = (n % 2) + '0'; n /= 2; }
    for (int j = i - 1; j >= 0; j--) putchar(bits[j]);
}

int main(void) {
    const char *text = "Hi";
    for (size_t i = 0; i < strlen(text); i++) {
        if (i > 0) putchar(' ');
        printBinary((unsigned char) text[i]);
    }
    // prints: 1001000 1101001
    return 0;
}

These snippets use the character code (ASCII for English letters, digits, and punctuation). RadixFlip uses Unicode code points, so emoji count as one character with one code.

Frequently asked questions

How do I convert text to binary?

Take each character, find its code (for example A is 65), convert that code to binary, then join the binary groups with spaces. Example: "Hi" → H is 72 = 1001000, i is 105 = 1101001, so "Hi" in binary is "1001000 1101001". Type any text in the converter above and RadixFlip does it live.

How do I convert my name to binary?

Name to binary is the same as text to binary — a name is just text. Convert each letter of the name to its code, then to binary, and join with spaces. Example: "Ana" → A is 65 = 1000001, n is 110 = 1101110, a is 97 = 1100001, so "Ana" in binary is "1000001 1101110 1100001". Type your name in the converter above.

What is Hi in binary?

"Hi" in binary is "1001000 1101001". H is code 72 = 1001000, i is code 105 = 1101001.

What is A in binary?

A in binary is 1000001, which is code 65 in decimal. With 8-bit padding it is written 01000001 — same value, with one leading zero added to make 8 bits.

How do I convert text to binary in Python?

Use " ".join(format(ord(c), "b") for c in text). For "Hi" that gives "1001000 1101001". Use format(ord(c), "08b") if you want 8-bit padded groups like "01001000 01101001".

How do I convert text to binary in Java and C?

Java: loop over the characters and append Integer.toBinaryString(c) plus a space. C: loop over the string, and for each character convert its code to binary by repeated division by 2. RadixFlip uses Unicode code points, so emoji count as one character.

How to convert decimal to binary →  ·  How to convert binary to decimal →