Text to Hex Converter
Maximum encoded size: 1,000,000 UTF-8 bytes.
Character Breakdown
Enter text above to see the per-character hex breakdown.
How Text to Hex Conversion Works
Converting text to hexadecimal means encoding characters as bytes and expressing each byte in base-16. This tool uses UTF-8, so it handles valid Unicode text rather than only basic English characters.
For standard ASCII characters (letters A–Z, digits 0–9, common punctuation), each character maps to a single byte. For example, "A" is decimal 65 = hex 41. For characters beyond ASCII — like "é", "ñ", or "中" — UTF-8 uses 2–4 bytes per character.
Common Use Cases
- Encoding strings for network protocols
- Preparing hex payloads for APIs
- Debugging character encoding issues
- Working with binary file formats
- Generating hex escape sequences
Quick Reference
- A–Z: 41–5A
- a–z: 61–7A
- 0–9: 30–39
- Space: 20
- Newline: 0A
Text to Hex vs ASCII to Hex
"Text to hex" and "ASCII to hex" perform the same operation for standard English characters — both convert each character to its hexadecimal byte value. The key difference is in how they handle characters beyond the basic ASCII range (codes 0–127).
Text to hex typically implies UTF-8 encoding, which represents Unicode scalar values and supports accented letters, CJK characters, emoji, mathematical symbols, and many modern and historic scripts. ASCII to hex is limited to the 128 characters defined in the original ASCII standard.
This converter encodes valid Unicode text as UTF-8. The ASCII to hex programming guide provides Python, JavaScript, C, and shell implementations. To convert in the reverse direction, use the Hex Decoder. For individual character code lookups, use the ASCII Code Converter.