Convert Text to Hex Online
Converting text to hexadecimal gives you a compact, human-readable representation of the underlying byte values of each character. Hex encoding is widely used in debugging, protocol analysis, cryptography, and data encoding. Knowing the hex values of your text helps when working with binary protocols, comparing strings at the byte level, or encoding data for transmission. This tool converts any text string to its hexadecimal representation, showing each character as a two-digit hex value. It correctly handles UTF-8 multi-byte characters by showing all the bytes that make up each character. The output can be formatted with or without spaces between bytes and in upper or lowercase hex. Results are instant and run entirely in your browser.
text
0 chars1 lines
hexREADY
0 chars1 lines
FAQ
- How is each character converted to hex?
- Each character is encoded to its UTF-8 byte sequence, then each byte is converted to a 2-digit hexadecimal value. For example, the letter A has byte value 65 decimal = 41 hex.
- What about characters that use multiple bytes?
- UTF-8 multi-byte characters (like accented letters and emoji) produce multiple hex pairs. An emoji like 😀 uses 4 bytes, resulting in 4 hex pairs in the output.
- What is the difference between text to hex and text to base64?
- Both encode text as safe ASCII. Hex uses 2 characters per byte (50% overhead); Base64 uses about 1.33 characters per byte. Base64 is more compact; hex is easier to read byte-by-byte.