Number Converters · Browser · Free
Text String to Hex Code Converter
Enter some text, choose an encoding and a delimiter, then press Convert to get the hexadecimal byte values. ASCII uses one byte per character for codes 0 to 127, and UTF-8 uses one to four bytes.
Text to hexadecimal bytes
This converter encodes a text string into the hexadecimal value of each byte. You type or paste the text into the field, then choose a character encoding and how the values should be separated.
The encoding select offers four choices: ASCII, UTF-8, UTF-16 little endian and UTF-16 big endian. ASCII uses one byte per character for codes 0 to 127, while UTF-8 uses one to four bytes. No other encodings are offered. The delimiter select offers a space, a comma or none.
Nothing is calculated until you press Convert. The result then appears in a card below the button. Copy writes the result and its unit to the clipboard, and Clear resets the form.
Hexadecimal byte value formula
Each character of the input is turned into its byte values, and every byte is shown in hexadecimal. The values are listed in the order the characters appear in your text, separated by the delimiter you chose.
The table gives the byte value for a handful of characters in hexadecimal: A is 41, B is 42, Z is 5A, a is 61, z is 7A, the digit 0 is 30, the digit 9 is 39, an exclamation mark is 21 and a question mark is 3F.
| Character | Hexadecimal |
|---|---|
| A | 41 |
| B | 42 |
| Z | 5A |
| a | 61 |
| b | 62 |
| z | 7A |
| 0 | 30 |
| 9 | 39 |
| ! | 21 |
| ? | 3F |