FreeToolsAll

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.

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"

CharASCIIHex
H7248
e10165
l1086C
l1086C
o1116F
3220
W8757
o1116F
r11472
l1086C
d10064

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 %.

Explore More Utilities

Related Binary Converter Tools

View all in Binary Converter Tools