Text to Binary / Hex / ASCII Converter
Guide: Base64 Explained: What It Is and When to Use It
Nothing you enter or choose here leaves your device. This tool runs in your browser.
Text is already numbers
Computers store every character as a number, and every number as a row of bits. A text to binary converter doesn't change your text. It just shows the numbers that were already there. Which numbers you get depends on the encoding, and this tool uses UTF-8, the encoding behind most of the web.
Converting the word Hi by hand
- Look up each letter's code. In ASCII, H is 72 and i is 105.
- Write each code in binary, padded to 8 digits. 72 is 64 plus 8, so it becomes 01001000. 105 is 64 plus 32 plus 8 plus 1, so it becomes 01101001.
- Put the bytes side by side: 01001000 01101001.
The same two bytes in the other formats the tool offers:
binary 01001000 01101001 hex 48 69 decimal 72 105 octal 110 151
Switch to Codes to text, paste any of those lines, and you get Hi back.
Why an accented letter takes two bytes and an emoji takes four
UTF-8 uses between one and four bytes per character, depending on where the character sits in the Unicode table:
- Up to U+007F, one byte. This covers English letters, digits and basic punctuation.
- Up to U+07FF, two bytes. Most accented Latin letters, plus Greek, Cyrillic, Hebrew and Arabic.
- Up to U+FFFF, three bytes. The euro sign and most Chinese, Japanese and Korean characters.
- Above that, four bytes. Emoji and rarer scripts.
A few real examples. The letter e with an acute accent is two bytes, C3 A9, which is 11000011 10101001 in binary. The euro sign is three bytes, E2 82 AC. A grinning-face emoji, U+1F600, is four bytes: F0 9F 98 80.
The first byte tells a decoder how long the character is. A byte starting with 110 begins a two-byte character, 1110 begins a three-byte one, and 11110 begins a four-byte one. Every follow-up byte starts with 10. When decoding fails with an invalid UTF-8 message, it's usually because the bytes break that pattern.
Handy facts about ASCII
- Capital A is 65 and lowercase a is 97. They differ by exactly 32, which is a single bit, so flipping that one bit swaps the case of a letter.
- The digit characters 0 to 9 are codes 48 to 57. The character 7 is stored as 55, not 7.
- Space is 32, line feed (a new line) is 10, and carriage return is 13.
- Codes below 32 are control characters, like tab (9). They don't print anything.
Mistakes people make
- Confusing a character with a number. Typing 5 here gives 00110101, because the character 5 is code 53. If you want the number 5 in binary, use the number base converter, which gives 101.
- Dropping leading zeros. Each byte needs all 8 binary digits. If you paste the bytes with no spaces and one is short, every byte after it shifts and the result turns into nonsense.
- Decoding with the wrong encoding elsewhere. If an accented letter turns into a capital A with a tilde followed by a stray symbol in another program, that program read UTF-8 bytes as if they were single-byte Latin-1 text. The bytes are fine. The reader is wrong.
- Treating binary as secret. Anyone can decode it in seconds. It's a way of writing text, not a way of hiding it. For hashing or encoding for transport, see the hash generator and Base64 encoder.
Written by Akinrinmade Michael ยท Updated October 24, 2026
How to use
- 1Choose Text to codes or Codes to text.
- 2Pick binary, hexadecimal, decimal or octal.
- 3Type or paste your input.
- 4Click Copy result.
Frequently asked questions
How is text turned into numbers?
The text is encoded as UTF-8 bytes, and each byte is shown in your chosen number system. Plain English letters use one byte, and accented letters and emoji use two to four.
Can I decode without spaces between the numbers?
Binary and hex can be pasted as one long string and are split into 8-bit or 2-digit groups. Decimal and octal need a space or comma between numbers.
Why does decoding fail?
A value may contain a digit that doesn't belong to the format, may be larger than 255, or the bytes may not form valid UTF-8 text. The message names the problem value.
Is ASCII the same as UTF-8?
For the first 128 characters, yes. Letters, digits and basic punctuation have the same code in both.
What does Hello look like in binary?
01001000 01100101 01101100 01101100 01101111. That's five bytes, one for each letter: H is 72, e is 101, l is 108 twice, and o is 111.
Why is there a group of 8 digits for every letter?
A byte is 8 bits, and each English letter fits in one byte. Letters outside basic English can use two to four bytes, so they show up as two to four groups.
Read the guide
Learn how this works and how to get the most from it.
Developer
Base64 Explained: What It Is and When to Use It
How Base64 and Base32 encoding work, a worked example by hand, why Base64 makes data 33% larger, and when to use each. Neither one is encryption.
3 min read
Related tools
Number Base Converter
Convert between binary, octal, decimal, hexadecimal and any base to 36.
Base64 & URL Encoder / Decoder
Encode and decode Base64 and URL-encoded text instantly.
String Escape / Unescape
Escape and unescape strings for JSON, JavaScript, Java, Python, HTML, SQL, regex and CSV.
Hash Generator
Generate MD5, SHA-1, SHA-256 and SHA-512 hashes and HMACs.