Text to Hex Converter
Convert text to hexadecimal representation. Choose separator style, case, and prefix options.
Paste text and get its hex bytes back — pick a separator (space, comma, newline, or none), switch between uppercase and lowercase, and toggle the 0x prefix if you need it for C arrays or embedded work. UTF-8 in, so emoji and accented letters encode fine (they just take more than one byte each). And everything runs in your browser. Nothing gets uploaded.
How to Use
Enter your text in the left panel. You can type or paste any text you want to convert to hexadecimal.
Choose options -- select separator (space, comma, newline, none), case (upper/lower), and whether to include the 0x prefix.
Click Convert or leave Live mode on to see hex output instantly as you type.
Copy, Download, or Swap the result. Swap lets you convert hex back to text.
Frequently Asked Questions
What is text to hex conversion?
Text to hex conversion takes each character in your input and converts it to its hexadecimal byte representation using UTF-8 encoding. For standard ASCII characters, each character becomes 2 hex digits (e.g. "A" becomes "41"). For characters outside ASCII (like emoji or accented letters), multiple hex bytes are produced per character.
What does the 0x prefix mean?
The 0x prefix is a common convention in programming to indicate that a number is in hexadecimal format. For example, "0x41" clearly indicates hex, whereas "41" could be decimal. Enabling this option adds "0x" before each hex byte in the output.
What is the difference between uppercase and lowercase hex?
Hexadecimal digits A-F can be written as uppercase (A, B, C, D, E, F) or lowercase (a, b, c, d, e, f). Both are valid and represent the same values. Uppercase is more traditional, while lowercase is commonly used in web development (e.g., CSS color codes).
Can I convert hex back to text?
Yes! Click the Swap button to switch to hex-to-text mode. Paste your hex values in the input and the tool will decode them back to the original text. It auto-detects the separator format used.
How are newlines and special characters handled?
All characters are converted, including spaces (0x20), newlines (0x0A for LF, 0x0D for CR), tabs (0x09), and any other special characters. The tool uses UTF-8 encoding, so every character has a well-defined hex representation.