Text to Hexadecimal Converter
Convert any text to its hexadecimal representation. Each character becomes two hex digits — the byte value in hex.
Common Values
| Input | Hexadecimal |
|---|---|
| Hello | 48 65 6c 6c 6f |
| World | 57 6f 72 6c 64 |
| ABC | 41 42 43 |
| hello world | 68 65 6c 6c 6f 20 77 6f 72 6c 64 |
| hex | 68 65 78 |
How It Works
Each character is converted to its ASCII code, then expressed as two hex digits. "A" is ASCII 65 = 0x41. "Hello" becomes 48 65 6c 6c 6f. Hex is a compact way to represent binary data and is widely used in debugging, networking, and cryptography.
Worked Examples
| Text | Hexadecimal |
|---|---|
| A | 41 |
| a | 61 |
| 0 | 30 |
| H | 48 |
| ! | 21 |
| 20 | |
| ~ | 7e |
Related Conversions
Frequently Asked Questions
- How do I convert text to hex?
Get the ASCII code for each character, then convert that code to hexadecimal. "A" is decimal 65, which is 41 in hex.
- What is "Hello" in hex?
"Hello" in hex is 48 65 6c 6c 6f. Each character becomes two lowercase hex digits.
- Why is hex used for text encoding?
Hex representation of text is used in debugging tools, network packet analysis, file hex editors, and cryptographic hash output.
- Is text-to-hex the same as ASCII encoding?
Yes. For standard English text, converting to hex shows the ASCII code in hexadecimal. For non-ASCII text, the UTF-8 byte values are used.