Also available in: Español · Português · Français · العربية
Binary Translator: Text to Binary, Hex, and Decimal
Convert text to binary, hexadecimal, or decimal through UTF-8, with a byte-by-byte breakdown that shows exactly what each character cost.
What is a binary translator?
A binary translator converts text into the byte values a computer actually stores, and converts those byte values back into text. Type a sentence and this one shows you the 1s and 0s behind it; paste in binary, hex, or decimal and it reads the text back out. That sounds like a single well-defined operation, but it isn't — text only becomes binary once you pick an encoding, and different encodings turn the same character into different bytes.
This tool converts through UTF-8, the encoding behind the overwhelming majority of text on the web, and it says so rather than leaving the choice invisible. The byte breakdown table under the Text to binary result exists for exactly this reason: instead of asking you to trust a black box, it lists every character next to its Unicode code point and the exact bytes UTF-8 assigns it, so the encoding is something you can see, not something you have to take on faith.
How to use it
- Pick a mode and a base. Choose Text to binary or Binary to text from the mode pills, then choose Binary, Hexadecimal, or Decimal from the number base pills — the same three options apply in either direction.
- Type or paste into the input box. The output box fills in as you type, no button to press. Check the Characters and Bytes counts underneath to see how many Unicode characters you entered and how many bytes UTF-8 needed for them, and press Copy — it turns to Copied! for two seconds — to grab the result.
- Read the byte breakdown. In Text to binary mode, the table underneath lists every character with its Unicode code point and the bytes it cost. Toggle Separate bytes with spaces to control whether binary and hex are grouped by byte or packed tight; decimal keeps its spaces regardless, since the box is locked on for that base.
Binary of what?
“Binary of what” is the question most binary translators never ask. Text is not binary until an encoding turns each character into bytes, and the encoding you pick changes the answer — the same letter can come out as a different bit pattern depending on the standard behind it. This tool always converts through UTF-8, so the result is consistent and reproducible, and the byte breakdown table makes that choice visible instead of hiding it behind a single unlabeled output.
The byte counts vary more than most people expect. A is one byte: 01000001. é is two: 11000011 10101001. A thumbs-up emoji is four bytes — 11110000 10011111 10010001 10001101 — for a single character on screen. The euro sign costs three bytes. The Brazilian flag emoji, which looks like one character, is actually two Unicode code points and costs eight bytes total.
The reason so few tools ever have to name an encoding is that, for every one of the 128 code points below 128 — plain English letters, digits, and basic punctuation — UTF-8 is byte-for-byte identical to ASCII. That overlap was checked across all 128, and it's exactly why a translator that never mentions encoding can still look correct indefinitely: it works for plain English, right up until an accented letter or an emoji shows up, and the euro sign sitting just past that boundary already costs three bytes instead of one. It's also why a character and a byte aren't the same thing, and why JavaScript's own string length isn't reliable either — the thumbs-up emoji reads as one character but reports a length of 2.
Three bases, and why decoding refuses to guess
The same text looks different in each base: “Hi” is 01001000 01101001 in binary, 48 69 in hex, and 72 105 in decimal. Decimal always keeps its separator, because an unseparated run of decimal byte values can't be read back unambiguously — 72105 has no single correct split into bytes. Binary and hex don't have that problem, since every byte is a fixed width — 8 digits or 2 — so they can be packed tight with the separator turned off if you'd rather not see the spaces.
Decoding is strict exactly where being loose would corrupt the result. A separated group gets left-padded, so “1000001 1000010” reads back as AB without ambiguity — the spaces tell the decoder where each byte starts. But a lone, unseparated run of 7 bits is refused rather than guessed at: 1000001 could be a 7-bit A or a damaged 8-bit byte missing its leading digit, and silently picking one is how a tool quietly mangles data instead of reporting a problem. Four distinct failures get four distinct messages — a digit that doesn't belong in the chosen base, a group of the wrong length, a value above 255 that can't be a byte, and a set of bytes that isn't valid UTF-8 text — rather than one generic error hiding what went wrong. Round-tripping was checked across 14 sample texts, all three bases, and both separator settings, and every one came back exact, including emoji, Arabic, Japanese, and text with tabs and line breaks.
It's worth being clear about what this tool isn't. It converts text, not files — it won't turn a PNG into binary or turn a binary file back into anything. Decoding runs bytes through a strict UTF-8 decoder, so a run of bytes that isn't text — raw machine code, a compressed file, an image — gets reported as not-text rather than displayed as mangled characters. And binary here just means the byte values behind text: it isn't the machine code a CPU executes, and it isn't a way to hide anything, since anyone can convert it straight back.
Why is it free?
Every conversion happens in your browser — the encoding, the decoding, the byte breakdown — so nothing you type is ever uploaded or saved anywhere. There's no account to create, no watermark on the output, and no paid tier hiding a feature. Reload the page and the boxes are empty again; convert as much text as you need, as many times as you need.