Tools

Home
String to HexHex to Base64ASCII to HexHex to ASCIIBase64 Encode/Decode

String to Hex Converter

Convert text strings to hexadecimal byte representation. Choose separator style and encoding.

Your files never leave your browser
INPUT (STRING)0 chars
OUTPUT (HEX)0 bytes
Ready·UTF-8 encoding | Space separator

Paste text and get the hex bytes back — pick your separator (space, none, \x, or 0x) and encoding (ASCII or UTF-8). The Swap button flips direction, so hex goes back to readable text. And everything runs in your browser. Nothing gets uploaded.

How to Use

Enter your string in the left panel. You can type or paste any text.

Choose options -- select a separator style (space, none, \x, 0x), encoding (UTF-8 or ASCII), and case.

Click Convert or leave Live mode on for instant hex output as you type.

Copy, Download, or Swap the result. Swap converts hex back to string.

Frequently Asked Questions

What is string to hex conversion?

String to hex conversion takes each character in your text and converts it to its hexadecimal byte representation. For ASCII characters, each character becomes a 2-digit hex value (e.g. "A" becomes "41"). For multi-byte UTF-8 characters (like emoji or accented letters), each character can produce 2-4 hex bytes.

What is the difference between ASCII and UTF-8 encoding?

ASCII encoding only handles characters with codes 0-127 (basic English letters, digits, punctuation). Characters outside this range will be replaced with "3F" (the hex for "?"). UTF-8 encoding handles the full Unicode character set, encoding characters above ASCII as multi-byte sequences (2-4 bytes each).

Which separator style should I use?

Space separation ("48 65 6C 6C 6F") is the most common and readable. The \x prefix style ("\x48\x65\x6C\x6C\x6F") is used in C, Python, and many programming languages for hex string literals. The 0x prefix ("0x48 0x65 0x6C") is common in programming for individual hex values. No separator joins all bytes together.

Can I convert hex back to string?

Yes! Use the Swap button to reverse the conversion direction. It will move the hex output into the input field and convert it back to the original string. The tool auto-detects the separator format used in the hex input.

Share: