Text to HEX Converter
Convert plain text or ASCII strings to hexadecimal encoding instantly. Free, browser-based Text to Hex tool — supports UTF-8 characters, copy output, and formatted display.
HEX Output (space-separated bytes)
Character Map
Output Format Options
- Space-separated: 48 65 6C 6C 6F (most readable)
- No separator: 48656C6C6F (compact, copy-paste for protocols)
- 0x prefix: 0x48 0x65 0x6C (C/C++ array format)
- \x escape: \x48\x65\x6C (Python/JavaScript strings)
- Comma-separated: 0x48,0x65,0x6C (C array literals)
Example: "Hello World"
| Char | ASCII | Hex |
|---|---|---|
| H | 72 | 48 |
| e | 101 | 65 |
| l | 108 | 6C |
| l | 108 | 6C |
| o | 111 | 6F |
| 32 | 20 | |
| W | 87 | 57 |
| o | 111 | 6F |
| r | 114 | 72 |
| l | 108 | 6C |
| d | 100 | 64 |
Frequently Asked Questions
What is text to hex conversion?
Every character has an ASCII or Unicode code point. Text-to-hex converts each character into its 2-digit hexadecimal byte representation. For example, "Hello" becomes "48 65 6C 6C 6F" — these are the hex codes of H(72), e(101), l(108), l(108), o(111) in decimal, written in base-16.
Why convert text to hex?
Common reasons include: encoding binary data for safe transmission in URLs or HTTP headers, writing hex escape sequences in source code (\x48\x65\x6C\x6C\x6F), analyzing protocol packets in Wireshark, obfuscating strings in scripts, embedding data in HTML/CSS (content: "\0048"), and working with low-level binary file formats.
Does this converter support Unicode / emoji?
Yes. The converter uses UTF-8 encoding, so multi-byte Unicode characters (Chinese, Arabic, emoji) are correctly encoded as 2–4 hex bytes per character. Each byte is shown separately in the output.
What is the hex code for a space character?
A space (ASCII code 32) is 0x20 in hexadecimal. This is why URL-encoded spaces sometimes appear as %20 — the percent-encoding format uses hex codes prefixed with %.