Hex ↔ ASCII Converter
Convert text to hexadecimal or hex back to ASCII. Supports space-separated and 0x prefix output. 100% client-side.
How to Use the Hex ↔ ASCII Converter
- Paste your input — ASCII text for hex output, or hex values for ASCII output.
- Choose direction — use the "ASCII → Hex" or "Hex → ASCII" chip to set the conversion direction.
- Choose output format — optionally add "Space-separated" for readability or "0x Prefix" for programming use.
- Copy or download — use the buttons above the output to copy or save the result.
What Is Hexadecimal?
Hexadecimal (often shortened to "hex") is a base-16 number system that uses the digits 0 through 9 and the letters A through F to represent values from 0 to 15. In computing, a single byte of data (8 bits) can be represented as exactly two hexadecimal digits, making hex a compact and human-readable way to work with binary data. For example, the decimal number 255 (which is 11111111 in binary) is represented as FF in hexadecimal. The decimal number 65, which corresponds to the ASCII character A, is represented as 41 in hex.
What Is ASCII?
ASCII (American Standard Code for Information Interchange) is a character encoding standard developed in the 1960s that maps the numbers 0 to 127 to specific characters. It includes uppercase letters (A–Z, codes 65–90), lowercase letters (a–z, codes 97–122), digits (0–9, codes 48–57), punctuation marks, and control characters (like newline, tab, and carriage return). ASCII is the foundation of virtually all modern character encoding systems, including UTF-8, which is backward compatible with ASCII for the first 128 characters.
Output Format Options
- Default — compact hex string with no separators (e.g.,
48656c6c6f) - Space-separated — each byte separated by a space for readability (e.g.,
48 65 6c 6c 6f) - 0x Prefix — each byte prefixed with 0x, space-separated (e.g.,
0x48 0x65 0x6c 0x6c 0x6f)
Where Is Hex Used?
Hexadecimal representation appears in many areas of software development and computer science:
- Network analysis — tools like Wireshark display raw packet data as hex dumps
- Debugging — debuggers and memory inspectors show memory contents in hex
- Colors in CSS and design tools — colors are expressed as 6-digit hex codes (#10b981)
- Cryptography — hash values, encryption keys, and digital signatures are displayed in hex
- File formats — file headers and "magic numbers" that identify file types are specified in hex
- Assembly language — memory addresses and instruction codes are written in hex
- Binary protocols — binary data is encoded in hex for logging and debugging
Reading a Hex Dump
When working with tools like xxd or hexdump on Linux, the output typically shows three columns: the offset (position in the file), the hex values of the bytes, and the ASCII representation on the right (with non-printable characters shown as dots). Understanding this format is essential for reverse engineering, forensic analysis, and low-level protocol debugging. This converter helps you quickly decode individual hex values to understand what ASCII characters they represent. For related number system conversions, try our Number Base Converter or Binary to Text Converter.