String ↔ Hex Converter

Convert between UTF-8 text and hexadecimal bytes. Live conversion, UTF-8 safe, accepts multiple hex formats.

Input (text)

0 bytes

Output (hex)

Why encode text as hex?

Hexadecimal is the lingua franca for inspecting binary data. Every byte becomes exactly two hex characters (0–9, A–F), so a developer can glance at a dump and know its length, spot non-printable bytes, and pick out markers. Common situations: debugging protocol messages, reading wire captures, copying a binary value into a config file, or pasting a cryptographic digest into a bug report.

UTF-8 and multi-byte characters

This converter uses the browser's TextEncoder so multi-byte characters are handled correctly. The letter "A" is one byte (41), "Γ©" is two bytes (C3 A9), and emoji like "πŸš€" are four bytes (F0 9F 9A 80). The hex output always represents the underlying UTF-8 bytes, never the raw code point.

Decoder flexibility

The decoder accepts pretty much any common hex format. It strips whitespace, commas, colons, hyphens, and leading 0x prefixes before parsing, so 0x48 65 6C 6C 6F, 48:65:6c:6c:6f, and 48656c6c6f all decode to Hello. An odd number of hex characters is rejected with a clear error.