Overview
Encode plain text into hex - each byte of the text's UTF-8 encoding rendered as two lowercase hex digits, concatenated into one contiguous string (e.g. "Hello" becomes "48656c6c6f"). The text is first encoded to raw bytes with the browser's native `TextEncoder`, never by mapping each character to a hex value with `charCodeAt`, which would silently misencode multi-byte characters - the euro sign "€" is a single character but three UTF-8 bytes ("e282ac"), and a code-point-based approach would produce a wrong, shorter result. This is a focused, single-direction version of the same conversion available inside the bidirectional Hex to UTF-8 Converter, provided as its own dedicated page for anyone specifically looking to go from text to hex without the reverse-direction UI. Runs entirely client-side.
Best for: Encoding a piece of text into hex bytes for a hex-based protocol, log, or config value
How to use this tool
- Type or paste your text. Any text, including multi-byte Unicode characters.
- Text becomes UTF-8 bytes. The browser's TextEncoder produces the exact byte sequence the text represents.
- Each byte becomes two hex digits. The bytes are rendered as a contiguous lowercase hex string, ready to copy.
Frequently asked questions
"€" is a single character, but its UTF-8 encoding is three separate bytes (e2, 82, ac) - each byte becomes two hex digits, so the full character is represented by 6 hex characters ("e282ac"). A code-point-based approach (using the character's single Unicode number, 8364) would produce a different, incorrect result.
They share the same underlying text-to-hex logic. This page is a focused, single-direction version for anyone who only wants text-to-hex without a mode toggle; the Hex to UTF-8 Converter additionally supports the reverse direction (hex back to text) in one combined tool.
Output is lowercase (e.g. "e282ac") to match this site's other hex-encoding tools - most consumers of hex text (including this site's own Hex to UTF-8 Converter) accept either case interchangeably.