ASCII to Hex
Convert ASCII text to hexadecimal byte representation. Encodes input as UTF-8 and outputs space-separated hex values.Overview
The ASCII to Hex tool encodes text to hex bytes:- Input: Any text (ASCII, UTF-8, Unicode)
- Output: Space-separated lowercase hex bytes
Use Cases
Protocol construction
Build hex payloads for network protocols or embedded systems
Data embedding
Encode strings as hex literals for C, assembly, or configuration files
Debugging
Inspect byte-level representation of text data
Cryptographic input
Prepare text for hex-based hashing or encryption tools
Input Format
Paste any text. Unicode and multi-byte characters are supported.Example
Output
Space-separated lowercase hexadecimal bytes with byte count metadata.Example output
Example output
Input:Output:Meta:
Unicode example
Unicode example
Input:Output:Meta:The coffee emoji (U+2615) encodes to 3 bytes in UTF-8.
Implementation Details
The tool usesTextEncoder to convert the input string to UTF-8 bytes, then formats each byte as a two-digit lowercase hex string.
Source: lib/tools/engine.ts:962-966
Key logic
The output is always lowercase hex. For uppercase, manually convert the output or use a text case tool.
Character Encoding
ASCII (0x00-0x7F)
ASCII (0x00-0x7F)
Single-byte characters map directly to hex:
A→410→30\n→0a
Extended ASCII (0x80-0xFF)
Extended ASCII (0x80-0xFF)
Characters like
é, ñ encode to 2 bytes in UTF-8:é→c3 a9
Unicode (>0xFF)
Unicode (>0xFF)
Multi-byte characters (emoji, CJK, etc.) encode to 2-4 bytes:
🔥(U+1F525) →f0 9f 94 a5
Keyboard Shortcuts
Cmd/Ctrl+Enter— Convert ASCII to hexCmd/Ctrl+Shift+C— Copy outputCmd/Ctrl+Shift+S— Download output
Related Tools
Hex to ASCII
Reverse operation: convert hex bytes to ASCII text
Base64 String Encode/Decode
Encode/decode Base64 strings
String Inspector
Analyze byte length, encoding, and character frequency