Text Tools
Binary & ASCII converter.
Type text, binary, hex or decimal and get all four at once. Hello is 01001000 01100101 01101100 01101100 01101111, decimal 10 is 1010 and 11111111 is FF in hex.
Input
Output
Start typing and all four formats appear here.
Converting a number, not text?
Text to binary writes the bytes of each character: the letter A is code 65, stored as the byte 01000001. Number base conversion changes how one value is written: the number 65 in base 2 is 1000001, in base 16 it is 41. They answer different questions, so pick the converter that matches what you have.
- Letter
Aas text:01000001(this page, Text input). - Number 65 as a value:
1000001in binary,41in hex (a number base converter).
For numbers, use one of these:
- Binary to decimal converter (base 2 to base 10)
- Decimal to binary converter (base 10 to base 2)
- Binary to hex converter (base 2 to base 16)
- Hex to binary converter (base 16 to base 2)
- Binary to octal converter (base 2 to base 8)
- Number base converter (any base from 2 to 36)
How binary conversion works
Computers store text as numbers. Each character has a numeric code, and that number is written in base 2 using only 0 and 1. One group of 8 bits is a byte, and a byte holds a value from 0 to 255. Hexadecimal is a shorthand for the same bytes: one hex digit covers 4 bits, so a byte is always two hex digits.
Text is encoded here as UTF-8 (RFC 3629), which matches ASCII (RFC 20) for the first 128 characters and uses two to four bytes for everything else. To check a byte sequence is valid UTF-8, use the UTF-8 encoder and decoder; for a string's size in bytes, use the string byte length calculator.
Other text and number base converters
This page converts text, binary, hex and decimal together. For a single direction with its own options and worked examples:
- Hex to text converter
- Text to hex converter
- Octal to text converter
- Text to octal converter
- ASCII to text converter
- Decimal to text converter
- Text to decimal converter
- Hex to decimal converter
- Decimal to hex converter
Worked examples
| Text | Binary | Hex | Decimal |
|---|---|---|---|
| A | 01000001 | 41 | 65 |
| a | 01100001 | 61 | 97 |
| 0 | 00110000 | 30 | 48 |
| Hi | 01001000 01101001 | 48 69 | 72 105 |
| é | 11000011 10101001 | C3 A9 | 195 169 |
| € | 11100010 10000010 10101100 | E2 82 AC | 226 130 172 |
To read a byte by hand, add the place values (128, 64, 32, 16, 8, 4, 2, 1) wherever there is a 1. For 01000001 that is 64 + 1 = 65, which is the code for capital A. For a complete character lookup, use the ASCII table; for another text encoding, try the Morse code translator.
Convert one direction at a time
This page converts all four formats at once. If you only need one conversion, these pages show the working for it:
- Text to binary and binary to text (ASCII and UTF-8)
- Binary to decimal and decimal to binary
- Binary to hex and hex to binary
- Binary to octal and octal to binary
- ASCII table for every character code, and the binary fraction converter for numbers with a point
Frequently asked questions
How do I convert text to binary?
Each character is turned into its numeric code, then that number is written in base 2. For example, A is code 65, which is 01000001 in 8 bits. Type or paste text into the converter with Text selected and the binary row fills in.
How do I convert binary to text?
Split the bits into groups of 8, turn each group into a number, then look up the character for that number. In the converter, choose Binary as the input format and paste the bits; spaces, line breaks and 0b prefixes are ignored.
How do I convert binary to decimal?
Add up the powers of two where a bit is 1, reading from the right: 1, 2, 4, 8, 16, 32, 64, 128. So 01000001 is 64 + 1 = 65. Choose Binary as the input and read the Decimal row.
Why does a character like é or € take more than 8 bits?
This tool encodes text as UTF-8, where characters outside basic ASCII use two to four bytes. é is the two bytes 11000011 10101001 (hex C3 A9) and € is three bytes (hex E2 82 AC). Plain English letters, digits and punctuation still use one byte each.
What is the binary for the word Hello?
Hello is 01001000 01100101 01101100 01101100 01101111: five letters, five bytes. H is 72, e is 101, l is 108 and o is 111.
What is 10 in binary, and what is 1010 in decimal?
Decimal 10 is binary 1010 (8 + 2), and binary 1010 is decimal 10. On this page decimal means byte values, so 10 shows as the 8-bit byte 00001010. For a plain number conversion use the decimal to binary or binary to decimal converter.
How do I convert binary to hex?
Group the bits in fours from the right and replace each group with a hex digit. 1111 1111 is FF and 1010 0011 is A3. Choose Binary as the input and read the Hex row.
What is the difference between ASCII and binary?
ASCII is a table that gives each of 128 characters a number from 0 to 127. Binary is a way of writing numbers with 0 and 1. ASCII text in binary is each character code written in base 2, one byte per character.
Can I type hex or decimal instead of text?
Yes. Switch the input format to Hex (for example 48 65 6C 6C 6F) or Decimal (72 101 108 108 111) and the Text and Binary rows update. Decimal values are byte values from 0 to 255.
What is the difference between a binary converter for text and for numbers?
A text converter writes the UTF-8 bytes of each character, so A (code 65) becomes 01000001. A number converter rewrites one value in another base, so the number 65 is 1000001 in binary and 41 in hex. Use the text converter for words and the number converters for values.
Is anything uploaded?
No. The conversion runs in your browser with the built-in TextEncoder, so nothing you type leaves the page.