Text to Hex Converter

Convert any text string to its hexadecimal representation instantly. Multiple output formats, full UTF-8 support, all in your browser.
Client-Side Only No Rate Limits No Signup Required
0 characters · 0 bytes
0 hex bytes
Try:

Character Breakdown

Enter text above to see the per-character hex breakdown.

How Text to Hex Conversion Works

Converting text to hexadecimal means translating each character into its numeric byte value, expressed in base-16. This tool uses UTF-8 encoding by default, which means it handles any text — not just 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 supports every character from every language — accented letters, CJK characters, emoji, mathematical symbols. ASCII to hex is limited to the 128 characters defined in the original ASCII standard.

For ASCII-specific conversion, see our ASCII to Hex converter. To convert in the reverse direction (hexadecimal back to text), use the Hex to ASCII converter.

Frequently Asked Questions

How do I convert text to hexadecimal?
Paste or type your text into the input field above. Each character is instantly converted to its hexadecimal byte value. For example, "Hello" becomes "48 65 6C 6C 6F". The conversion runs entirely in your browser — no data leaves your device.
What is the difference between text to hex and ASCII to hex?
For standard English characters (letters, digits, punctuation), the result is identical — both produce the same hex bytes. The difference appears with non-English characters: "text to hex" typically uses UTF-8 encoding, which handles characters from every language (é, ñ, 你好, emoji). ASCII is limited to 128 characters (codes 0–127). Our tool uses UTF-8 by default, so it works with any text.
Can I convert text with special characters to hex?
Yes. Our tool supports full UTF-8 encoding, so any character — accented letters, Chinese/Japanese/Korean characters, emoji, symbols — is correctly converted. Multi-byte characters produce multiple hex pairs. For example, "é" becomes "C3 A9" (two bytes in UTF-8).
What hex output formats are available?
You can choose from: space-separated (48 65 6C), continuous (48656C), colon-separated (48:65:6C), or 0x-prefixed (0x48 0x65 0x6C). You can also toggle between uppercase and lowercase hex digits. All formats represent the same underlying data.
How to convert text to hex in Python?
Use: "Hello".encode("utf-8").hex() which returns "48656c6c6f". For space-separated output: " ".join(f"{b:02x}" for b in "Hello".encode("utf-8")). In JavaScript: Array.from(new TextEncoder().encode("Hello")).map(b => b.toString(16).padStart(2, "0")).join(" ").
Is there a limit on text length?
No practical limit. The tool runs in your browser using JavaScript, so it can handle very large text inputs without sending data to a server. For extremely large files (10MB+), performance depends on your device.