Text to Hex Converter
Text to hexadecimal bytes and back.
This text to binary converter writes each character of your text as 8-bit bytes of 0s and 1s, and translates binary code back into readable text. It uses UTF-8, so any language works.
| Character | Code point | Decimal | UTF-8 bytes | UTF-16 |
|---|
Each character is encoded as UTF-8, and every byte is written as 8 binary digits. The letter H has the code 72, and 72 in binary is 01001000.
H = 72 = 01001000 i = 105 = 01101001
Decoding reads the bits in groups of 8 and turns the bytes back into characters.
| Character | Decimal | Binary |
|---|---|---|
| A | 65 | 01000001 |
| B | 66 | 01000010 |
| C | 67 | 01000011 |
| D | 68 | 01000100 |
| E | 69 | 01000101 |
| F | 70 | 01000110 |
| G | 71 | 01000111 |
| H | 72 | 01001000 |
| I | 73 | 01001001 |
| J | 74 | 01001010 |
| K | 75 | 01001011 |
| L | 76 | 01001100 |
| M | 77 | 01001101 |
| a | 97 | 01100001 |
| b | 98 | 01100010 |
| c | 99 | 01100011 |
| d | 100 | 01100100 |
| e | 101 | 01100101 |
| f | 102 | 01100110 |
| g | 103 | 01100111 |
| h | 104 | 01101000 |
| i | 105 | 01101001 |
| j | 106 | 01101010 |
| k | 107 | 01101011 |
| l | 108 | 01101100 |
| m | 109 | 01101101 |
| space | 32 | 00100000 |
A byte is 8 bits and can hold 256 values, which is enough for all ASCII characters with room to spare. UTF-8 uses the spare high bit to mark multi-byte characters, so anything outside ASCII shows up as bytes starting with 1.
Look up each character's code (A is 65), convert it to base 2, and pad it to 8 digits: 01000001.
Split the bits into groups of 8, convert each group to a number, and look up the character.
Eight for English letters. Accented letters use 16 bits and emoji 32 bits in UTF-8.
Often used together with the Text to Binary Converter.
Text to hexadecimal bytes and back.
Decimal numbers to binary, with two's complement.
Text to U+ code points, escapes, and entities.