ASCII to Hex Converter
Convert ASCII text or single characters to hex and back. Hello = 48 65 6C 6C 6F. Includes a printable ASCII to hex table. How it works
Use the ASCII to Hex Converter
About the ASCII to Hex Converter
In ASCII, “Hello” is 48 65 6C 6C 6F in hex: H = 48, e = 65, l = 6C, o = 6F. Every printable ASCII character has a two-digit hex code, from 20 (space) to 7E (~).
ASCII to hex table (codes 32 to 127)
| Char (32–63) | Dec (32–63) | Hex (20–3F) | Char (64–95) | Dec (64–95) | Hex (40–5F) | Char (96–127) | Dec (96–127) | Hex (60–7F) |
|---|---|---|---|---|---|---|---|---|
| space | 32 | 20 | @ | 64 | 40 | ` | 96 | 60 |
| ! | 33 | 21 | A | 65 | 41 | a | 97 | 61 |
| " | 34 | 22 | B | 66 | 42 | b | 98 | 62 |
| # | 35 | 23 | C | 67 | 43 | c | 99 | 63 |
| $ | 36 | 24 | D | 68 | 44 | d | 100 | 64 |
| % | 37 | 25 | E | 69 | 45 | e | 101 | 65 |
| & | 38 | 26 | F | 70 | 46 | f | 102 | 66 |
| ' | 39 | 27 | G | 71 | 47 | g | 103 | 67 |
| ( | 40 | 28 | H | 72 | 48 | h | 104 | 68 |
| ) | 41 | 29 | I | 73 | 49 | i | 105 | 69 |
| * | 42 | 2A | J | 74 | 4A | j | 106 | 6A |
| + | 43 | 2B | K | 75 | 4B | k | 107 | 6B |
| , | 44 | 2C | L | 76 | 4C | l | 108 | 6C |
| - | 45 | 2D | M | 77 | 4D | m | 109 | 6D |
| . | 46 | 2E | N | 78 | 4E | n | 110 | 6E |
| / | 47 | 2F | O | 79 | 4F | o | 111 | 6F |
| 0 | 48 | 30 | P | 80 | 50 | p | 112 | 70 |
| 1 | 49 | 31 | Q | 81 | 51 | q | 113 | 71 |
| 2 | 50 | 32 | R | 82 | 52 | r | 114 | 72 |
| 3 | 51 | 33 | S | 83 | 53 | s | 115 | 73 |
| 4 | 52 | 34 | T | 84 | 54 | t | 116 | 74 |
| 5 | 53 | 35 | U | 85 | 55 | u | 117 | 75 |
| 6 | 54 | 36 | V | 86 | 56 | v | 118 | 76 |
| 7 | 55 | 37 | W | 87 | 57 | w | 119 | 77 |
| 8 | 56 | 38 | X | 88 | 58 | x | 120 | 78 |
| 9 | 57 | 39 | Y | 89 | 59 | y | 121 | 79 |
| : | 58 | 3A | Z | 90 | 5A | z | 122 | 7A |
| ; | 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 | DEL (control) | 127 | 7F |
Codes 0 to 31 and 127 (DEL) are control characters with no printed symbol. The ones you meet most: tab = 09, line feed = 0A, carriage return = 0D.
“Hello” in each output format
| Format | Output |
|---|---|
| Spaced, uppercase | 48 65 6C 6C 6F |
| Spaced, lowercase | 48 65 6c 6c 6f |
| Continuous | 48656C6C6F |
| 0x prefix | 0x48 0x65 0x6C 0x6C 0x6F |
| Backslash-x escapes | \x48\x65\x6C\x6C\x6F |
| HTML entities | Hello |
| Array literal | [0x48, 0x65, 0x6C, 0x6C, 0x6F] |
| Unicode escapes | \u0048\u0065\u006C\u006C\u006F |
é, € and 😀 in each character encoding
| Encoding | é | € | 😀 |
|---|---|---|---|
| Unicode code points (default) | E9 | 20AC | 1F600 |
| UTF-8 bytes | C3 A9 | E2 82 AC | F0 9F 98 80 |
| UTF-16 LE bytes | E9 00 | AC 20 | 3D D8 00 DE |
| UTF-16 BE bytes | 00 E9 | 20 AC | D8 3D DE 00 |
| Windows-1252 bytes | E9 | 80 | 3F (not in the set) |
| ISO-8859-1 (Latin-1) bytes | E9 | 3F (not in the set) | 3F (not in the set) |
A character a single-byte set cannot hold is written as 3F, the byte for ?, and the page counts how many were replaced.
Methodology
Each character is replaced by its character code written in base 16 and padded to two digits. For plain ASCII text that code is the ASCII value, one byte per character. With a byte encoding chosen in the Character encoding menu (UTF-8, UTF-16 LE or BE, Windows-1252 or ISO-8859-1), the text is encoded in it first and every byte is listed. Hex → ASCII reads the input two hex digits at a time as bytes and decodes them as UTF-8, or in the chosen encoding, so 48 65 6C 6C 6F gives Hello and C3 A9 gives é. Groups written as &#x…; or \u… are read as code points.
How to use this tool
- Type or paste text. The hex appears as you type; the page opens with “Hello World”, which is 48 65 6C 6C 6F 20 57 6F 72 6C 64.
- Pick an output format and copy the result. The Character Inspector lists the decimal and hex code of every character.
- Switch to Hex → ASCII to decode. Switching direction empties the input box, so copy anything you still need first.
Frequently asked questions
- How do I convert a character to hex by hand?
- Look up its ASCII decimal code, divide by 16, and write the quotient and the remainder as hex digits, with 10 to 15 written as A to F. For k: 107 ÷ 16 = 6 remainder 11, so k = 6B.
- What is “Hello” in hex?
- 48 65 6C 6C 6F. In lowercase, “hello” is 68 65 6C 6C 6F, and “Hello World” is 48 65 6C 6C 6F 20 57 6F 72 6C 64.
- Do uppercase and lowercase letters have different hex codes?
- Yes. A to Z are 41 to 5A and a to z are 61 to 7A. Each lowercase letter is exactly 20 hex (32 decimal) above its capital: M = 4D, m = 6D.
- What is the hex code for a space, and for the digits 0 to 9?
- Space is 20 (decimal 32). The digits 0 to 9 are 30 to 39, so the second hex digit is the number itself: 7 is 37.
- What happens with characters that are not ASCII?
- Anything above 7F is outside ASCII, so the result depends on the Character encoding menu. On Unicode code points, the default, é is E9 and € is 20AC. UTF-8 bytes give é as C3 A9, € as E2 82 AC and 😀 as F0 9F 98 80. UTF-16 LE and BE, Windows-1252 and ISO-8859-1 are there too; Windows-1252 writes € as 80, and ISO-8859-1, which has no €, writes 3F.
- How do I convert hex back to ASCII?
- Switch to Hex → ASCII and paste the hex. Pairs can run together or be separated by spaces, commas or hyphens, and a 0x in front of a pair is ignored: 48 65 6C 6C 6F, 48656C6C6F and 0x48,0x65,0x6C,0x6C,0x6F all decode to Hello.
Related Tools
View all toolsBinary Converter
Convert text to binary and binary back to text in UTF-8: Hello is 01001000 01100101 01101100 01101100 01101111. A second tab converts whole numbers.
Number Base Converter
Convert a whole number between binary, octal, decimal and hexadecimal and see all four at once: 255 is 11111111, 377 and FF.
Hex to Decimal
Convert hex to decimal, binary or octal with exact whole-number math: FF is 255. Pads hex to 8, 16, 32 or 64 bits and converts 200 lines at once.
Roman Numeral Converter
Convert Roman numerals to numbers and numbers to Roman numerals, from 1 to 3,999,999, with a step breakdown. Spellings such as IIII are refused.
Hex to ASCII
Convert hex to ASCII text: 48 65 6C 6C 6F is Hello. Bytes are read as UTF-8, and odd digit counts or bad characters get an error.
Unicode Lookup
Look up any character or code point such as U+1F600: its name, category, script, block and UTF-8, UTF-16 and UTF-32 bytes, or search names and browse blocks.