ASCII to hex converter
Type ASCII text and get each character as a two-digit hex byte, formatted for code, URLs or hex editors.
Printable ASCII in hex (32–126)
| Char | Hex | Dec |
|---|---|---|
| space | 20 | 32 |
| ! | 21 | 33 |
| " | 22 | 34 |
| # | 23 | 35 |
| $ | 24 | 36 |
| % | 25 | 37 |
| & | 26 | 38 |
| ' | 27 | 39 |
| ( | 28 | 40 |
| ) | 29 | 41 |
| * | 2A | 42 |
| + | 2B | 43 |
| , | 2C | 44 |
| - | 2D | 45 |
| . | 2E | 46 |
| / | 2F | 47 |
| 0 | 30 | 48 |
| 1 | 31 | 49 |
| 2 | 32 | 50 |
| 3 | 33 | 51 |
| 4 | 34 | 52 |
| 5 | 35 | 53 |
| 6 | 36 | 54 |
| 7 | 37 | 55 |
| 8 | 38 | 56 |
| 9 | 39 | 57 |
| : | 3A | 58 |
| ; | 3B | 59 |
| < | 3C | 60 |
| = | 3D | 61 |
| > | 3E | 62 |
| ? | 3F | 63 |
| Char | Hex | Dec |
|---|---|---|
| @ | 40 | 64 |
| A | 41 | 65 |
| B | 42 | 66 |
| C | 43 | 67 |
| D | 44 | 68 |
| E | 45 | 69 |
| F | 46 | 70 |
| G | 47 | 71 |
| H | 48 | 72 |
| I | 49 | 73 |
| J | 4A | 74 |
| K | 4B | 75 |
| L | 4C | 76 |
| M | 4D | 77 |
| N | 4E | 78 |
| O | 4F | 79 |
| P | 50 | 80 |
| Q | 51 | 81 |
| R | 52 | 82 |
| S | 53 | 83 |
| T | 54 | 84 |
| U | 55 | 85 |
| V | 56 | 86 |
| W | 57 | 87 |
| X | 58 | 88 |
| Y | 59 | 89 |
| Z | 5A | 90 |
| [ | 5B | 91 |
| \ | 5C | 92 |
| ] | 5D | 93 |
| ^ | 5E | 94 |
| _ | 5F | 95 |
| Char | Hex | Dec |
|---|---|---|
| ` | 60 | 96 |
| a | 61 | 97 |
| b | 62 | 98 |
| c | 63 | 99 |
| d | 64 | 100 |
| e | 65 | 101 |
| f | 66 | 102 |
| g | 67 | 103 |
| h | 68 | 104 |
| i | 69 | 105 |
| j | 6A | 106 |
| k | 6B | 107 |
| l | 6C | 108 |
| m | 6D | 109 |
| n | 6E | 110 |
| o | 6F | 111 |
| p | 70 | 112 |
| q | 71 | 113 |
| r | 72 | 114 |
| s | 73 | 115 |
| t | 74 | 116 |
| u | 75 | 117 |
| v | 76 | 118 |
| w | 77 | 119 |
| x | 78 | 120 |
| y | 79 | 121 |
| z | 7A | 122 |
| { | 7B | 123 |
| | | 7C | 124 |
| } | 7D | 125 |
| ~ | 7E | 126 |
Control codes 0–31 and 127 are in the full ASCII table.
ASCII vs. UTF-8
ASCII defines 128 characters. UTF-8 keeps those same 128 byte values and adds multi-byte sequences for everything else, so for plain English text the two give identical hex. This page defaults to ASCII and tells you when a character falls outside it; the encoding menu switches to UTF-8, UTF-16 or Windows-1252 when you need them. For the general tool see text to hex.
Related: Hex to ASCII · Binary to ASCII · ASCII to binary
Questions people ask
How do I convert ASCII to hex?
Take each character’s ASCII code and write it in base 16 with two digits. “A” = 65 = 41, “z” = 122 = 7A, a space = 32 = 20.
What is “Hello” in hex?
48 65 6C 6C 6F.
Why does my text include characters ASCII can’t encode?
Accents, curly quotes and emoji are outside 7-bit ASCII. Switch the encoding menu to UTF-8 to get their multi-byte hex.
Which hex format should I pick?
Spaced pairs for reading, continuous for hashes and protocol fields, 0x48 for C or JavaScript arrays, \x48 for string literals, %48 for URLs.