Skip to content
CodeShift
Menu

ASCII Converter — Text to ASCII Codes & Back

Type text to see each character's ASCII code, or paste numbers to turn them back into text. The complete 0–127 table is below.

Standard: ASCII (ANSI X3.4 / RFC 20)Reviewed October 2026 · by The CodeShift DeskHow we translate
TexttoDecimal codes

Printable chart: ASCII Table

What ASCII is

ASCII — the American Standard Code for Information Interchange — assigns a number from 0 to 127 to each of 128 characters: English letters, digits, punctuation, the space, and control codes that once drove teleprinters (carriage return, line feed, bell and so on). It was published as an American standard in the 1960s (ANSI X3.4) and is reproduced for internet use in RFC 20. ASCII is still everywhere because UTF-8, the dominant text encoding today, keeps the same 128 codes as its first block.

How to use the converter

Type in the Text box and each character becomes its decimal code, separated by spaces (or commas, or one per line). Paste numbers into the Decimal codes box and they become text again. Numbers above 127 are not ASCII; rather than fail, the converter treats them as Unicode code points and says so. Likewise, if your text contains é, ü, € or emoji, you get their Unicode numbers with a note that they are outside ASCII.

Worked example

The word “ASCII” converts to 65 83 67 73 73. Some patterns make ASCII easy to work out by hand:

  • Capital letters run from 65 (A) to 90 (Z).
  • Lowercase letters run from 97 (a) to 122 (z) — each exactly 32 above its capital, which in binary is a single bit (0100000).
  • Digits 0–9 are codes 48–57, so the digit's value is its code minus 48.
  • The space is 32, and the visible characters run from 33 (!) to 126 (~).

Control characters

Codes 0–31 and 127 are not printable. Several still matter: 9 is the tab, 10 is line feed (LF, the Unix new line), 13 is carriage return (CR; Windows uses CR followed by LF), and 27 is escape, used in terminal colour codes. Decoding a control code produces the actual invisible character, which may show as a line break or nothing at all.

The full ASCII table (0–127)

Generated from the same code as the converter. A printable version lives on the ASCII table page.

Control characters (0–31)

DecHexBinaryChar
0000000000NUL
1010000001SOH
2020000010STX
3030000011ETX
4040000100EOT
5050000101ENQ
6060000110ACK
7070000111BEL
8080001000BS
9090001001HT
100A0001010LF
110B0001011VT
120C0001100FF
130D0001101CR
140E0001110SO
150F0001111SI
16100010000DLE
17110010001DC1
18120010010DC2
19130010011DC3
20140010100DC4
21150010101NAK
22160010110SYN
23170010111ETB
24180011000CAN
25190011001EM
261A0011010SUB
271B0011011ESC
281C0011100FS
291D0011101GS
301E0011110RS
311F0011111US

Space, punctuation and digits (32–63)

DecHexBinaryChar
32200100000SP
33210100001!
34220100010"
35230100011#
36240100100$
37250100101%
38260100110&
39270100111'
40280101000(
41290101001)
422A0101010*
432B0101011+
442C0101100,
452D0101101-
462E0101110.
472F0101111/
483001100000
493101100011
503201100102
513301100113
523401101004
533501101015
543601101106
553701101117
563801110008
573901110019
583A0111010:
593B0111011;
603C0111100<
613D0111101=
623E0111110>
633F0111111?

Uppercase letters and symbols (64–95)

DecHexBinaryChar
64401000000@
65411000001A
66421000010B
67431000011C
68441000100D
69451000101E
70461000110F
71471000111G
72481001000H
73491001001I
744A1001010J
754B1001011K
764C1001100L
774D1001101M
784E1001110N
794F1001111O
80501010000P
81511010001Q
82521010010R
83531010011S
84541010100T
85551010101U
86561010110V
87571010111W
88581011000X
89591011001Y
905A1011010Z
915B1011011[
925C1011100\
935D1011101]
945E1011110^
955F1011111_

Lowercase letters, symbols and DEL (96–127)

DecHexBinaryChar
96601100000`
97611100001a
98621100010b
99631100011c
100641100100d
101651100101e
102661100110f
103671100111g
104681101000h
105691101001i
1066A1101010j
1076B1101011k
1086C1101100l
1096D1101101m
1106E1101110n
1116F1101111o
112701110000p
113711110001q
114721110010r
115731110011s
116741110100t
117751110101u
118761110110v
119771110111w
120781111000x
121791111001y
1227A1111010z
1237B1111011{
1247C1111100|
1257D1111101}
1267E1111110~
1277F1111111DEL

ASCII, extended ASCII and Unicode

“Extended ASCII” is not one standard: codes 128–255 meant different things in different code pages (Latin-1, Windows-1252 and others), which is why old documents sometimes show garbled accents. Unicode solved this by giving every character one number, and UTF-8 stores those numbers in one to four bytes. See the binary translator and hex converter to view the UTF-8 bytes of any text.

Converting text to ASCII by hand

  1. Find each character in the table above (or the printable ASCII table).
  2. Write down its decimal code, separated by spaces: “Hi!” is 72 105 33.
  3. Remember the space: it is a character too, code 32, and is easy to forget when encoding a sentence.

Why sorting by ASCII can surprise you

Because every capital letter has a lower code than every lowercase letter, sorting text by raw character codes puts all capitalised words first: “apple”, “Zebra”, “mango”, “Banana” sorts as “Banana”, “Zebra”, “apple”, “mango”, since Z is 90 and a is 97. Digits (48–57) come before both, and many punctuation marks before those. This is why file lists and spreadsheets often offer a separate “natural” or case-insensitive sort.

ASCII codes in programming

Most languages expose these numbers directly. In JavaScript, "A".charCodeAt(0) gives 65 and String.fromCharCode(72, 105) gives “Hi”; in Python, ord("A") and chr(72) do the same. Beyond ASCII, Python’s ord() returns the Unicode code point — the number this converter shows for é or emoji — while in JavaScript you need codePointAt(), because charCodeAt() returns UTF-16 code units and splits an emoji into two numbers.

Frequently asked questions

What is the ASCII code for A?+

Capital A is 65 (hex 41, binary 1000001). Lowercase a is 97 — always exactly 32 more than its capital.

How many characters are in ASCII?+

128, numbered 0 to 127: 33 control codes (0–31 and 127), the space (32), and 94 printable characters.

What happens with characters like é or emoji?+

They are not part of ASCII. The converter shows their Unicode code point in decimal instead (é = 233, 😀 = 128512) and flags them, so you always know when text has gone beyond ASCII.

Can I paste codes separated by commas?+

Yes. Decimal codes can be separated by spaces, commas, semicolons or new lines; any other characters are ignored and reported.

Guides

More translators