Skip to content

ASCII Text to Decimal Converter

Convert text into the decimal character code of each character, such as A = 65 and a = 97.

Runs in your browser Free, no sign-up
Loading tool workspace...

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

  1. Type or paste the text.
  2. Read the decimal code for each character.
  3. Choose the separator: space, comma, new line or none.
  4. 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.

CharacterDecimalHexNotes
(space)3220Space
!3321
"3422
#3523
$3624
%3725
&3826
'3927
(4028
)4129
*422A
+432B
,442C
-452D
.462E
/472F
04830Digits run 48–57
14931
25032
35133
45234
55335
65436
75537
85638
95739
:583A
;593B
<603C
=613D
>623E
?633F
@6440
A6541Capitals run 65–90
B6642
C6743
D6844
E6945
F7046
G7147
H7248
I7349
J744A
K754B
L764C
M774D
N784E
O794F
P8050
Q8151
R8252
S8353
T8454
U8555
V8656
W8757
X8858
Y8959
Z905A
[915B
\925C
]935D
^945E
_955F
`9660
a9761Lowercase runs 97–122, capital + 32
b9862
c9963
d10064
e10165
f10266
g10367
h10468
i10569
j1066A
k1076B
l1086C
m1096D
n1106E
o1116F
p11270
q11371
r11472
s11573
t11674
u11775
v11876
w11977
x12078
y12179
z1227A
{1237B
|1247C
}1257D
~1267EThe 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.

More converters tools

View all