Text to Binary
Type or paste text to see it in every representation at once, with a breakdown of each character. Conversion happens in your browser.
Decode back to text
Paste binary, hex, decimal or octal. The format is detected automatically and named below the box — some inputs are genuinely ambiguous, so pick one from the list if the guess is wrong.
Character breakdown
| Char | Dec | Hex | Binary | UTF-8 bytes |
|---|
Text is numbers all the way down
A computer stores no letters, only numbers. An encoding is the agreement about which number means which character, and every representation on this page — binary, hexadecimal, decimal, octal — is the same numbers written in a different base. Converting "text to binary" is really two steps: look up each character's number, then write that number in base 2.
Which encoding
For English text the answer is usually ASCII, where each character is one number from 0 to 127 and therefore one byte. H is 72, which is 01001000. That is why "text to binary" tools traditionally show eight bits per character.
It stops being that simple the moment a character falls outside ASCII. Modern text is UTF-8, where characters above 127 take two, three or four bytes. An accented é is one character but two bytes; an emoji is usually four. This page shows the real UTF-8 bytes rather than pretending every character is one byte, which is why the byte count and the character count can differ.
Reading the bases
| Base | Digits | "Hi" becomes | Where you see it |
|---|---|---|---|
| Binary | 0–1 | 01001000 01101001 | Bit manipulation, protocol specs, teaching |
| Octal | 0–7 | 110 151 | Unix file permissions, older escape sequences |
| Decimal | 0–9 | 72 105 | HTML numeric entities, character tables |
| Hexadecimal | 0–9, A–F | 48 69 | Hex dumps, colour codes, memory addresses, almost everything |
Hexadecimal dominates because one hex digit is exactly four bits and two are exactly one byte. Decimal has no such alignment: the byte 255 is FF in hex and 11111111 in binary, both of which show the byte boundary, while 255 hides it.
Why this is not encryption
Text written in binary is still the same text, exactly as legible to anything that can read binary. The same applies to hex, to Base64 and to percent encoding: all of them are ways to represent bytes, not ways to hide them, and every one is reversed by a single function call. If something needs to be secret it needs encryption, which requires a key. If you have a password or token in front of you in binary, treat it as if it were in plain text — because it is.
Useful things to notice
- Capitals and lowercase differ by one bit.
Ais 65,ais 97, and 32 is a single bit — so01000001and01100001differ only in position 3. This is why case conversion is a bitwise operation rather than a lookup. - Digits carry their own value. The character
7is 55, and 55 − 48 = 7. The last four bits of any digit character are the digit itself. - A space is a character. 32,
00100000. Trailing spaces are invisible on screen and perfectly visible here, which makes this a quick way to find them. - Line endings show up too. A newline is 10 and a carriage return is 13. Text that came from Windows will show both, which is often the explanation for a file that "looks identical" but does not compare equal.
Frequently asked questions
How do I convert text to binary?
Look up each character's numeric code, then write that number in base 2. H is 72 in ASCII, and 72 in binary is 01001000. This page does it for a whole string at once and shows the per-character working.
Why is each character eight bits?
ASCII needs only seven bits, but computers address memory in bytes of eight, so each character is padded with a leading zero. Characters outside ASCII use more than one byte under UTF-8 — this page shows the real byte count rather than assuming one.
Is binary text encrypted?
No. It is the same text in a different notation, and anything that can read binary can read it. Base64 and percent encoding are the same: representations, not protection. Hiding something requires encryption and a key.
What happens to emoji and accented characters?
They are encoded as UTF-8, which uses two to four bytes for anything above ASCII. An emoji is normally four bytes, and one that combines several code points can be more. The breakdown shows each byte, so a character count and a byte count will legitimately differ.
Can I convert binary back to text?
Yes — paste it into the decode box, with or without spaces between the groups. Binary, hexadecimal, decimal and octal are detected automatically, and the detected format is named so you can see what was assumed.
Why does my decoded text come out wrong?
Usually because the input is ambiguous. 72 105 is valid decimal and valid octal, and it means different characters in each — decimal Hi, octal :E. The decoder shows which format it read, and you can override it with the format list.
Why does hexadecimal appear more often than decimal?
One hex digit is exactly four bits and two digits are exactly one byte, so hex shows byte boundaries directly. Decimal does not line up with any power of two, which is why hex dumps, colour codes and memory addresses all use it.