ASCII to Hex Converter
Convert ASCII text to hexadecimal representation online. Choose separator style and letter case.
Paste ASCII text and get back the hex code for every character — pick the separator (space, comma, 0x prefix, or none) and the case you want. Useful for debugging byte streams, building test fixtures, or reading a hex dump someone posted without context. And everything runs in your browser. Nothing gets uploaded.
How to Use
Enter your ASCII text in the left panel. You can type or paste any text you want to convert.
Choose options -- select a separator (space, none, 0x prefix, comma, or newline) and letter case (uppercase or lowercase).
Click Convert or leave Live mode enabled to see hex output instantly as you type.
Copy, Download, or Swap the result. Use Swap to convert hex back to ASCII text.
Frequently Asked Questions
What is ASCII to hex conversion?
ASCII to hex conversion takes each character in your text and translates it into its hexadecimal (base-16) code. Every ASCII character has a numeric code between 0 and 127. For example, the letter "A" has the ASCII code 65, which in hexadecimal is 41. This tool performs that conversion for every character in your input text, producing a hex string that represents the original data.
What separator options are available?
You can choose between several separator styles: Space separates each hex byte with a space (e.g. "48 65 6C 6C 6F"). None joins all hex digits together ("48656C6C6F"). The 0x prefix format adds "0x" before each byte ("0x48 0x65 0x6C 0x6C 0x6F"), commonly used in programming. Comma separation and newline are also available for different use cases.
What is the difference between uppercase and lowercase hex?
Hexadecimal uses digits 0-9 and letters A-F (or a-f). Uppercase produces values like "4A" while lowercase produces "4a". Both represent the same value. Uppercase is more traditional in documentation and data sheets, while lowercase is common in web development (e.g., CSS color codes) and Unix tools.
Can I convert hex back to ASCII?
Yes! Use the Swap button to reverse the conversion. It moves the hex output into the input field and switches to hex-to-ASCII mode. The tool automatically detects the separator used in the hex input and converts each hex pair back to its corresponding ASCII character.
What happens with non-ASCII characters?
Standard ASCII only covers characters with codes 0-127 (hex 00-7F). If your text contains characters outside this range (such as accented letters, emoji, or other Unicode characters), they will be replaced with a question mark (hex 3F) since they cannot be represented in 7-bit ASCII. For full Unicode support, consider using a UTF-8 to hex tool.