ASCII to Hex Converter Online
Convert ASCII text to hexadecimal values or decode hex strings back to readable ASCII characters. View results in hex, decimal, and octal simultaneously with configurable separators, prefixes, and letter casing. Includes a complete printable ASCII reference table. Everything runs locally in your browser.
Printable ASCII Table Reference
The table below lists all 95 printable ASCII characters (codes 32 through 126) with their decimal, hexadecimal, octal, and binary representations. Use this as a quick reference when working with character encoding conversions.
| Dec | Hex | Oct | Char | Description |
|---|
Features at a Glance
Real-Time Bidirectional Conversion
Convert ASCII text to hexadecimal or hex strings back to readable ASCII characters instantly as you type. The tool processes each character through its numeric code point and displays the corresponding hexadecimal, decimal, octal, and binary representations simultaneously. All conversions happen in real time within your browser using native JavaScript, so there is no server delay, no data upload, and no processing limit. Whether you are encoding a single character or an entire document, results appear immediately in all four number bases at once.
Flexible Output Formatting
Customize the hex output to match any format your project requires. Choose between space, comma, colon, or no separator between hex values. Add a 0x or backslash-x prefix for programming contexts where prefix notation is standard. Toggle between uppercase and lowercase hex digits to suit your style guide or protocol specification. These formatting options apply to the hex output in the ASCII-to-Hex direction, letting you produce output that can be pasted directly into source code, configuration files, packet analyzers, or documentation without any manual editing.
Complete ASCII Reference Table
Access a comprehensive printable ASCII character table directly on the page. The reference covers all 95 printable characters from code 32 (space) through 126 (tilde), showing each character alongside its decimal, hexadecimal, and octal value. Use this table to look up any character code without switching to a separate resource. The table is especially useful for developers debugging character encoding issues, students learning about number systems, and anyone who needs to verify that a specific byte value maps to the expected character.
Multi-Base Output Display
Every conversion displays results in four number systems simultaneously: hexadecimal (base-16), decimal (base-10), octal (base-8), and binary (base-2). This multi-base view is invaluable for programmers who need to cross-reference values between different representations, hardware engineers inspecting register values, and students learning number system conversions. Each output field has its own copy button so you can grab exactly the format you need without selecting and copying manually from a mixed output.
Smart Hex Input Parsing
The Hex-to-ASCII converter intelligently handles hex input in virtually any format. Paste hex values separated by spaces, commas, colons, or with no separators at all. The tool automatically strips 0x and backslash-x prefixes, ignores whitespace and line breaks, and processes the remaining hex digits in pairs. This flexibility means you can paste hex dumps from packet captures, memory inspectors, programming consoles, and documentation without any manual cleanup. Invalid hex characters are detected and reported with a clear error message.
Private and Secure
All ASCII and hexadecimal conversions are performed entirely in your web browser. No data is transmitted to any server, stored in any database, or logged anywhere. Your text, hex values, and conversion results stay on your device at all times. This makes the tool safe for converting sensitive strings such as API tokens, password hashes, encryption keys, serial numbers, and proprietary protocol data. You can verify the client-side nature of this tool by checking your browser network tab while performing a conversion.
Step-by-Step Guide
- Choose your conversion direction. Click the ASCII → Hex tab to convert readable text into hexadecimal values, or click the Hex → ASCII tab to decode a hexadecimal string back into text. Configure the separator (space, comma, colon, or none), the prefix format (none, 0x, or \x), and the letter case (uppercase or lowercase) using the option dropdowns before converting.
- Enter your input. For ASCII-to-Hex, type or paste any text into the input area. For Hex-to-ASCII, paste hex values in any common format, including space-separated pairs, 0x-prefixed values, colon-separated bytes, or a continuous hex string. The tool auto-detects and cleans the input format for you.
- Review and copy results. The conversion runs in real time and shows results in hex, decimal, octal, and binary simultaneously. Click the Copy button on any output field to copy that specific format to your clipboard. Use the Clear button to reset the input and all output fields.
ASCII only covers code points 0-127 (7 bits). Characters beyond this range — accented letters, CJK characters, emoji — require multi-byte encodings like UTF-8. When converting text to hex, always know the encoding to avoid data corruption.
Assuming all text is ASCII when it might contain UTF-8 multi-byte characters. A single emoji like 😀 becomes 4 bytes (F0 9F 98 80) in hex, not 1. Parsing hex back to text with the wrong encoding produces garbled output.
Practical Applications
Embedded Systems Developer
An embedded engineer converts ASCII command strings to hex byte sequences for UART serial transmission to microcontrollers. When sensor responses come back as raw hex, they decode them instantly to verify protocol compliance.
Network Security Analyst
A security analyst inspects Wireshark packet captures by converting hex payload dumps to readable ASCII. This reveals hidden protocol messages, malformed headers, and suspicious data exfiltration patterns.
Digital Forensics Investigator
A forensics examiner analyzes hex dumps from disk images and RAM captures, converting byte sequences to ASCII to identify file signatures, embedded strings, and hidden text evidence in criminal investigations.
Understanding ASCII and Hexadecimal Encoding
The American Standard Code for Information Interchange, commonly known as ASCII, was first published in 1963 by the American Standards Association (now ANSI). It was designed to standardize how computers represent text characters, replacing the incompatible proprietary codes used by different manufacturers. ASCII assigns a unique numeric value between 0 and 127 to each of 128 characters, including 33 non-printing control characters (used for device communication and text formatting) and 95 printable characters (the space character, 26 uppercase letters, 26 lowercase letters, 10 digits, and 32 punctuation and symbol characters). The encoding uses seven bits per character, which fit neatly within the eight-bit bytes that became the standard unit of computer memory.
Hexadecimal notation is a base-16 number system that uses the digits 0 through 9 and the letters A through F (or a through f) to represent values. It became the preferred notation for computing because of its direct relationship to binary: each hex digit maps to exactly four bits, so a complete byte is always represented by exactly two hex digits. This makes hexadecimal far more compact and readable than binary while preserving a straightforward conversion path. Memory addresses, color codes, MAC addresses, byte arrays, encryption keys, and raw data dumps are all conventionally expressed in hexadecimal.
When you convert ASCII text to hex, each character in the string is replaced by the hexadecimal representation of its code point. For instance, the word "Hello" becomes 48 65 6C 6C 6F because H is decimal 72 (hex 48), e is decimal 101 (hex 65), l is decimal 108 (hex 6C), and o is decimal 111 (hex 6F). The reverse operation takes each hex byte pair, converts it to a decimal number, and looks up the corresponding ASCII character. This round-trip conversion is lossless for all characters within the ASCII range (0 to 127), making it a fundamental operation in programming, networking, data analysis, and digital forensics.
FAQ
What is ASCII and why is it important?
ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns numeric values to 128 characters, including English letters, digits, punctuation marks, and control characters. Published in 1963 and last updated in 1986, ASCII remains the foundation of nearly all modern character encoding systems. Every text file, programming language, network protocol, and operating system uses ASCII or a superset of it. ASCII uses seven bits to represent each character, giving it a range of 0 to 127. The first 32 codes (0 through 31) and code 127 are control characters used for device communication, while codes 32 through 126 are printable characters that include the space, letters, numbers, and symbols you see on a standard keyboard.
How are ASCII characters represented in hexadecimal?
Each ASCII character has a numeric code point that can be expressed in different number bases. Hexadecimal (base-16) is the most common representation in computing because it maps neatly to binary: each hex digit represents exactly four bits, so a single byte (eight bits) is always exactly two hex digits. For example, the uppercase letter A has ASCII code 65 in decimal, which is 41 in hexadecimal and 01000001 in binary. Programmers and system engineers frequently use hex notation because it is more compact than binary and easier to convert mentally. In most programming languages and data formats, hexadecimal values are prefixed with 0x to distinguish them from decimal numbers.
What is extended ASCII and how does it differ from standard ASCII?
Standard ASCII defines 128 characters using seven bits (codes 0 to 127). Extended ASCII refers to various eight-bit encoding schemes that use the remaining 128 code points (128 to 255) to represent additional characters such as accented letters, box-drawing symbols, mathematical signs, and currency symbols. There is no single extended ASCII standard; different systems created their own mappings for the upper range. Common extended ASCII code pages include ISO 8859-1 (Latin-1) used in Western Europe, Windows-1252 used by Microsoft Windows, and Code Page 437 used by IBM PCs. Because these extensions are incompatible with each other, the same byte value can display different characters on different systems, which is one of the reasons Unicode was created as a universal replacement.
What is the difference between Unicode and ASCII?
ASCII encodes 128 characters using seven bits, covering only the basic Latin alphabet, digits, punctuation, and control codes used primarily in English. Unicode is a far more comprehensive standard that aims to encode every character from every writing system in the world. The current Unicode standard defines over 149,000 characters covering 161 modern and historic scripts, including emoji. UTF-8, the most widely used Unicode encoding on the web, is backward-compatible with ASCII: the first 128 code points in UTF-8 are identical to ASCII, and each is stored as a single byte. Characters beyond the ASCII range are encoded using two to four bytes. This backward compatibility means that any valid ASCII text is also valid UTF-8, which greatly eased the transition from ASCII to Unicode across the internet.
What are ASCII control characters?
ASCII control characters occupy code points 0 through 31 and code point 127 (DEL). Unlike printable characters, control characters do not represent visible symbols. Instead, they were originally designed to control hardware devices such as teletypes, printers, and communication equipment. Some of the most commonly encountered control characters include NULL (0x00), which is used as a string terminator in the C programming language; Line Feed or LF (0x0A), which moves the cursor to the next line and serves as the newline character on Unix and Linux systems; Carriage Return or CR (0x0D), which returns the cursor to the beginning of the line and is paired with LF as the newline sequence on Windows; Tab or HT (0x09), which inserts horizontal whitespace; and Escape or ESC (0x1B), which is used to begin ANSI escape sequences for terminal formatting.
Why is hexadecimal used in computing instead of decimal?
Hexadecimal is preferred in computing because it provides a compact and human-readable representation of binary data. Since each hex digit corresponds to exactly four binary digits (bits), conversion between hex and binary is trivial: the hex value F equals binary 1111, and 0 equals 0000. A single byte of eight bits is always represented by exactly two hex digits, making it easy to read memory addresses, color codes, MAC addresses, and raw data dumps. Decimal, by contrast, does not align with binary boundaries, so a byte value can be one, two, or three decimal digits, and mental conversion is much harder. Hexadecimal strikes the ideal balance between compactness (shorter than binary) and simplicity (direct binary mapping), which is why it became the standard notation for low-level data representation in programming, debugging, networking, and digital design.
How do I convert hex to ASCII manually?
To convert a hexadecimal string to ASCII text by hand, first split the hex string into pairs of two characters. Each pair represents one byte, which corresponds to one ASCII character. Convert each hex pair to its decimal equivalent by multiplying the first digit by 16 and adding the second digit, using the values A=10, B=11, C=12, D=13, E=14, and F=15. Then look up the resulting decimal number in an ASCII table to find the corresponding character. For example, the hex pair 48 converts to (4 times 16) plus 8, which equals 72, and ASCII code 72 is the uppercase letter H. The hex string 48 65 6C 6C 6F converts to the word Hello. If the hex values include a 0x prefix or separators like spaces, colons, or commas, remove those first before splitting into pairs.
ASCII Table Reference
The printable ASCII characters span decimal values 32 through 126. This compact reference table shows each character with its decimal and hexadecimal code, essential for debugging encoding issues, working with binary protocols, and understanding character sets.
| Dec | Hex | Char | Dec | Hex | Char | Dec | Hex | Char |
|---|---|---|---|---|---|---|---|---|
| 32 | 20 | SP | 64 | 40 | @ | 96 | 60 | ` |
| 33 | 21 | ! | 65 | 41 | A | 97 | 61 | a |
| 34 | 22 | " | 66 | 42 | B | 98 | 62 | b |
| 35 | 23 | # | 67 | 43 | C | 99 | 63 | c |
| 36 | 24 | $ | 68 | 44 | D | 100 | 64 | d |
| 37 | 25 | % | 69 | 45 | E | 101 | 65 | e |
| 38 | 26 | & | 70 | 46 | F | 102 | 66 | f |
| 39 | 27 | ' | 71 | 47 | G | 103 | 67 | g |
| 40 | 28 | ( | 72 | 48 | H | 104 | 68 | h |
| 41 | 29 | ) | 73 | 49 | I | 105 | 69 | i |
| 42 | 2A | * | 74 | 4A | J | 106 | 6A | j |
| 43 | 2B | + | 75 | 4B | K | 107 | 6B | k |
| 44 | 2C | , | 76 | 4C | L | 108 | 6C | l |
| 45 | 2D | - | 77 | 4D | M | 109 | 6D | m |
| 46 | 2E | . | 78 | 4E | N | 110 | 6E | n |
| 47 | 2F | / | 79 | 4F | O | 111 | 6F | o |
| 48 | 30 | 0 | 80 | 50 | P | 112 | 70 | p |
| 49 | 31 | 1 | 81 | 51 | Q | 113 | 71 | q |
| 50 | 32 | 2 | 82 | 52 | R | 114 | 72 | r |
| 51 | 33 | 3 | 83 | 53 | S | 115 | 73 | s |
| 52 | 34 | 4 | 84 | 54 | T | 116 | 74 | t |
| 53 | 35 | 5 | 85 | 55 | U | 117 | 75 | u |
| 54 | 36 | 6 | 86 | 56 | V | 118 | 76 | v |
| 55 | 37 | 7 | 87 | 57 | W | 119 | 77 | w |
| 56 | 38 | 8 | 88 | 58 | X | 120 | 78 | x |
| 57 | 39 | 9 | 89 | 59 | Y | 121 | 79 | y |
| 58 | 3A | : | 90 | 5A | Z | 122 | 7A | z |
| 59 | 3B | ; | 91 | 5B | [ | 123 | 7B | { |
| 60 | 3C | < | 92 | 5C | \ | 124 | 7C | | |
| 61 | 3D | = | 93 | 5D | ] | 125 | 7D | } |
| 62 | 3E | > | 94 | 5E | ^ | 126 | 7E | ~ |
| 63 | 3F | ? | 95 | 5F | _ |
Key ranges to remember: Digits 0-9 occupy hex 30-39. Uppercase A-Z spans hex 41-5A. Lowercase a-z spans hex 61-7A. The difference between uppercase and lowercase is exactly 32 (hex 20), which means flipping bit 5 toggles the case of any ASCII letter. Characters below 32 are non-printable control characters (tab, newline, carriage return, etc.), and 127 (hex 7F) is the DEL control character.