What is ASCII Text to Decimal Converter?
This ASCII to decimal converter shows the ASCII code, as a decimal number, of every character in a piece of text. In ASCII, A is 65, B is 66, a is 97, 0 is 48 and a space is 32, so "Hi!" becomes 72 105 33. These are the values returned by functions such as charCodeAt in JavaScript and ord in Python.
Type or paste text and the codes appear instantly, separated by spaces, commas, new lines or nothing. It is useful for debugging string handling, spotting invisible characters and learning how text is encoded.
How to use ASCII Text to Decimal Converter
- Type or paste the text.
- Read the decimal code for each character.
- Choose the separator: space, comma, new line or none.
- Copy the codes, or click Swap to turn decimal codes back into text.
Key features
- Shows the decimal code of every character
- Reveals invisible characters such as tabs and line breaks
- Separator choice: space, comma, new line or none
- Swap button to convert codes back to text
- Instant conversion as you type
- Runs entirely in your browser
Common use cases
- Finding hidden whitespace and control characters in strings
- Debugging string comparison and sorting issues
- Learning ASCII codes for programming classes
- Building character lookup tables
- Checking input sanitization and validation
Technical details & standards
Each character is converted with its UTF-16 code unit value, which is identical to its ASCII code for the 128 ASCII characters: 0–31 are control characters (9 is tab, 10 is line feed, 13 is carriage return), 32 is space, 48–57 are digits, 65–90 are A–Z and 97–122 are a–z.
Characters beyond ASCII show their Unicode code unit, such as 233 for é or 8364 for €; emoji are made of two code units (a surrogate pair). These values differ from UTF-8 byte values, which matters if you are comparing with bytes in a file.
ASCII table: printable characters and their codes
Every printable ASCII character with its decimal code, the number this converter writes, and its hex code. Read it the other way for decimal to text: 72 105 is "Hi". Codes 0–31 and 127 are control characters such as tab (9) and line feed (10), which have no visible symbol.
| Character | Decimal | Hex | Notes |
|---|---|---|---|
| (space) | 32 | 20 | Space |
| ! | 33 | 21 | |
| " | 34 | 22 | |
| # | 35 | 23 | |
| $ | 36 | 24 | |
| % | 37 | 25 | |
| & | 38 | 26 | |
| ' | 39 | 27 | |
| ( | 40 | 28 | |
| ) | 41 | 29 | |
| * | 42 | 2A | |
| + | 43 | 2B | |
| , | 44 | 2C | |
| - | 45 | 2D | |
| . | 46 | 2E | |
| / | 47 | 2F | |
| 0 | 48 | 30 | Digits run 48–57 |
| 1 | 49 | 31 | |
| 2 | 50 | 32 | |
| 3 | 51 | 33 | |
| 4 | 52 | 34 | |
| 5 | 53 | 35 | |
| 6 | 54 | 36 | |
| 7 | 55 | 37 | |
| 8 | 56 | 38 | |
| 9 | 57 | 39 | |
| : | 58 | 3A | |
| ; | 59 | 3B | |
| < | 60 | 3C | |
| = | 61 | 3D | |
| > | 62 | 3E | |
| ? | 63 | 3F | |
| @ | 64 | 40 | |
| A | 65 | 41 | Capitals run 65–90 |
| B | 66 | 42 | |
| C | 67 | 43 | |
| D | 68 | 44 | |
| E | 69 | 45 | |
| F | 70 | 46 | |
| G | 71 | 47 | |
| H | 72 | 48 | |
| I | 73 | 49 | |
| J | 74 | 4A | |
| K | 75 | 4B | |
| L | 76 | 4C | |
| M | 77 | 4D | |
| N | 78 | 4E | |
| O | 79 | 4F | |
| P | 80 | 50 | |
| Q | 81 | 51 | |
| R | 82 | 52 | |
| S | 83 | 53 | |
| T | 84 | 54 | |
| U | 85 | 55 | |
| V | 86 | 56 | |
| W | 87 | 57 | |
| X | 88 | 58 | |
| Y | 89 | 59 | |
| Z | 90 | 5A | |
| [ | 91 | 5B | |
| \ | 92 | 5C | |
| ] | 93 | 5D | |
| ^ | 94 | 5E | |
| _ | 95 | 5F | |
| ` | 96 | 60 | |
| a | 97 | 61 | Lowercase runs 97–122, capital + 32 |
| b | 98 | 62 | |
| c | 99 | 63 | |
| d | 100 | 64 | |
| e | 101 | 65 | |
| f | 102 | 66 | |
| g | 103 | 67 | |
| h | 104 | 68 | |
| i | 105 | 69 | |
| j | 106 | 6A | |
| k | 107 | 6B | |
| l | 108 | 6C | |
| m | 109 | 6D | |
| n | 110 | 6E | |
| o | 111 | 6F | |
| p | 112 | 70 | |
| q | 113 | 71 | |
| r | 114 | 72 | |
| s | 115 | 73 | |
| t | 116 | 74 | |
| u | 117 | 75 | |
| v | 118 | 76 | |
| w | 119 | 77 | |
| x | 120 | 78 | |
| y | 121 | 79 | |
| z | 122 | 7A | |
| { | 123 | 7B | |
| | | 124 | 7C | |
| } | 125 | 7D | |
| ~ | 126 | 7E | The last printable ASCII code |
Frequently asked questions
What is the ASCII value of A?
65 for uppercase A and 97 for lowercase a. Uppercase letters run 65–90 and lowercase 97–122.
How do I get a character's ASCII code in code?
JavaScript: "A".charCodeAt(0) returns 65. Python: ord("A"). C: (int)'A'. The reverse is String.fromCharCode(65) or chr(65).
What are the ASCII codes for space, tab and new line?
Space is 32, tab is 9, line feed (new line on Unix) is 10 and carriage return is 13. Windows line breaks are 13 10.
What is the ASCII table?
The ASCII table gives each character a number from 0 to 127. Codes 0 to 31 and 127 are control characters (9 is tab, 10 line feed, 13 carriage return, 127 delete), 32 is space, 48 to 57 are the digits 0 to 9, 65 to 90 are A to Z and 97 to 122 are a to z; the rest are punctuation. For example A is 65, which is 41 in hex and 01000001 in binary. Type any text above to see its codes.
What is the ASCII code of 0?
The digit 0 is 48 and 9 is 57, so the digit's value is its code minus 48. The null character, code 0, is different from the digit.
How do I convert decimal codes back to ASCII text?
Click Swap to reverse the converter, then enter the codes separated by spaces or commas: 72 101 108 108 111 becomes Hello. In code, Python's "".join(chr(int(n)) for n in codes.split()) and JavaScript's String.fromCharCode(72, 101, 108, 108, 111) do the same.