- Informatics
- Character Encoding
- ASCII Code
ASCII Converter
ASCII Encoder
The ASCII character coding standard describes a correspondence table for coding characters (letters, numbers, symbols) on a computer. This standard was defined in 1975 and contains 128 7-bit codes including 95 printable characters.
Today this standard is old and has been superseded by Unicode, which is backward compatible with ASCII.
Encryption consists of replacing each character with its value in the ASCII table (see below).
Example: Convert dCode string in ASCII, that is writing 1100100 1000011 1101111 1100100 1100101 in binary (7-bit) or 100 67 111 100 101 in decimal.
Characters which don't exist in the encoding table cannot be coded (no special characters, accents, etc.)
ASCII conversion consists of replacing each value (binary, octal, decimal or hexadecimal) with the corresponding character in the ASCII table. Its representation can be formatted into binary (0-1), octal (0-7), decimal (0-9) or hexadecimal (0-9a-f).
Example:
65 77 69 82 73 67 65 78 (Decimal) | AMERICAN |
83 116 97 110 100 97 114 100 (Decimal) | Standard |
1000011 1001111 1000100 1000101 (Binary 7bit) | CODE |
49 4E 46 4F 52 4D 41 54 49 4F 4E (Hexadecimal) | INFORMATION |
111 116 124 105 122 103 110 101 116 107 105 (Octal) | INTERCHANGE |
The message is generally written either in binary, or in decimal, or in hexadecimal (or rarely in octal).
The most frequent values must correspond to letters characters lowercase or uppercase (between 65 and 122 in decimal)
Any reference to skiing (ASCII ≈ a ski) is a clue.
The ASCII code is almost always represented on 1 byte (8bits) even if it occupies only 7bits.
In binary, use either 7 bits or 8 bits (by adding a leading zero) to represent an ASCII character.
In octal, it is represented with 3 characters (from 000 to 177).
In decimal, the number is between 1 and 128 (from 1 to 3 characters).
In hexadecimal, 2 characters are used (from 00 to 7f).
In the ASCII code there is a difference of 32 between an uppercase letter and a lowercase letter. So add 32 to the ASCII code of a capital letter to get a lowercase and subtract 32 from the ASCII code of a lowercase letter to have a capital letter. The corresponding binary operation consists in setting the 5th bit (starting from the right) to 0 (upper case) or 1 (lower case).
Example: A=0100001 (65) and a=0110001 (65+32=97)
This trick does not work for accented letters, which are not in the basic ASCII table
Full 7-bit ASCII table
000 | 000 | 00 | 0000000 | NUL | (Null char.) |
001 | 001 | 01 | 0000001 | SOH | (Start of Header) |
002 | 002 | 02 | 0000010 | STX | (Start of Text) |
003 | 003 | 03 | 0000011 | ETX | (End of Text) |
004 | 004 | 04 | 0000100 | EOT | (End of Transmission) |
005 | 005 | 05 | 0000101 | ENQ | (Enquiry) |
006 | 006 | 06 | 0000110 | ACK | (Acknowledgment) |
007 | 007 | 07 | 0000111 | BEL | (Bell) |
008 | 010 | 08 | 0001000 | BS | (Backspace) |
009 | 011 | 09 | 0001001 | HT | (Horizontal Tab) |
010 | 012 | 0A | 0001010 | LF | (Line Feed) |
011 | 013 | 0B | 0001011 | VT | (Vertical Tab) |
012 | 014 | 0C | 0001100 | FF | (Form Feed) |
013 | 015 | 0D | 0001101 | CR | (Carriage Return) |
014 | 016 | 0E | 0001110 | SO | (Shift Out) |
015 | 017 | 0F | 0001111 | SI | (Shift In) |
016 | 020 | 10 | 0010000 | DLE | (Data Link Escape) |
017 | 021 | 11 | 0010001 | DC1 | (XON)(Device Control 1) |
018 | 022 | 12 | 0010010 | DC2 | (Device Control 2) |
019 | 023 | 13 | 0010011 | DC3 | (XOFF)(Device Control 3) |
020 | 024 | 14 | 0010100 | DC4 | (Device Control 4) |
021 | 025 | 15 | 0010101 | NAK | (Negative Acknowledgement) |
022 | 026 | 16 | 0010110 | SYN | (Synchronous Idle) |
023 | 027 | 17 | 0010111 | ETB | (End of Trans. Block) |
024 | 030 | 18 | 0011000 | CAN | (Cancel) |
025 | 031 | 19 | 0011001 | EM | (End of Medium) |
026 | 032 | 1A | 0011010 | SUB | (Substitute) |
027 | 033 | 1B | 0011011 | ESC | (Escape) |
028 | 034 | 1C | 0011100 | FS | (File Separator) |
029 | 035 | 1D | 0011101 | GS | (Group Separator) |
030 | 036 | 1E | 0011110 | RS | (Request to Send)(Record Separator) |
031 | 037 | 1F | 0011111 | US | (Unit Separator) |
032 | 040 | 20 | 0100000 | SP | (Space) |
033 | 041 | 21 | 0100001 | ! | |
034 | 042 | 22 | 0100010 | " | |
035 | 043 | 23 | 0100011 | # | |
036 | 044 | 24 | 0100100 | $ | |
037 | 045 | 25 | 0100101 | % | |
038 | 046 | 26 | 0100110 | & | |
039 | 047 | 27 | 0100111 | ' | |
040 | 050 | 28 | 0101000 | ( | |
041 | 051 | 29 | 0101001 | ) | |
042 | 052 | 2A | 0101010 | * | |
043 | 053 | 2B | 0101011 | + | |
044 | 054 | 2C | 0101100 | , | |
045 | 055 | 2D | 0101101 | - | |
046 | 056 | 2E | 0101110 | . | |
047 | 057 | 2F | 0101111 | / | |
048 | 060 | 30 | 0110000 | 0 | |
049 | 061 | 31 | 0110001 | 1 | |
050 | 062 | 32 | 0110010 | 2 | |
051 | 063 | 33 | 0110011 | 3 | |
052 | 064 | 34 | 0110100 | 4 | |
053 | 065 | 35 | 0110101 | 5 | |
054 | 066 | 36 | 0110110 | 6 | |
055 | 067 | 37 | 0110111 | 7 | |
056 | 070 | 38 | 0111000 | 8 | |
057 | 071 | 39 | 0111001 | 9 | |
058 | 072 | 3A | 0111010 | : | |
059 | 073 | 3B | 0111011 | ; | |
060 | 074 | 3C | 0111100 | < | |
061 | 075 | 3D | 0111101 | = | |
062 | 076 | 3E | 0111110 | > | |
063 | 077 | 3F | 0111111 | ? | |
064 | 100 | 40 | 1000000 | @ | |
065 | 101 | 41 | 1000001 | A | |
066 | 102 | 42 | 1000010 | B | |
067 | 103 | 43 | 1000011 | C | |
068 | 104 | 44 | 1000100 | D | |
069 | 105 | 45 | 1000101 | E | |
070 | 106 | 46 | 1000110 | F | |
071 | 107 | 47 | 1000111 | G | |
072 | 110 | 48 | 1001000 | H | |
073 | 111 | 49 | 1001001 | I | |
074 | 112 | 4A | 1001010 | J | |
075 | 113 | 4B | 1001011 | K | |
076 | 114 | 4C | 1001100 | L | |
077 | 115 | 4D | 1001101 | M | |
078 | 116 | 4E | 1001110 | N | |
079 | 117 | 4F | 1001111 | O | |
080 | 120 | 50 | 1010000 | P | |
081 | 121 | 51 | 1010001 | Q | |
082 | 122 | 52 | 1010010 | R | |
083 | 123 | 53 | 1010011 | S | |
084 | 124 | 54 | 1010100 | T | |
085 | 125 | 55 | 1010101 | U | |
086 | 126 | 56 | 1010110 | V | |
087 | 127 | 57 | 1010111 | W | |
088 | 130 | 58 | 1011000 | X | |
089 | 131 | 59 | 1011001 | Y | |
090 | 132 | 5A | 1011010 | Z | |
091 | 133 | 5B | 1011011 | [ | |
092 | 134 | 5C | 1011100 | \ | |
093 | 135 | 5D | 1011101 | ] | |
094 | 136 | 5E | 1011110 | ^ | |
095 | 137 | 5F | 1011111 | _ | |
096 | 140 | 60 | 1100000 | ` | |
097 | 141 | 61 | 1100001 | a | |
098 | 142 | 62 | 1100010 | b | |
099 | 143 | 63 | 1100011 | c | |
100 | 144 | 64 | 1100100 | d | |
101 | 145 | 65 | 1100101 | e | |
102 | 146 | 66 | 1100110 | f | |
103 | 147 | 67 | 1100111 | g | |
104 | 150 | 68 | 1101000 | h | |
105 | 151 | 69 | 1101001 | i | |
106 | 152 | 6A | 1101010 | j | |
107 | 153 | 6B | 1101011 | k | |
108 | 154 | 6C | 1101100 | l | |
109 | 155 | 6D | 1101101 | m | |
110 | 156 | 6E | 1101110 | n | |
111 | 157 | 6F | 1101111 | o | |
112 | 160 | 70 | 1110000 | p | |
113 | 161 | 71 | 1110001 | q | |
114 | 162 | 72 | 1110010 | r | |
115 | 163 | 73 | 1110011 | s | |
116 | 164 | 74 | 1110100 | t | |
117 | 165 | 75 | 1110101 | u | |
118 | 166 | 76 | 1110110 | v | |
119 | 167 | 77 | 1110111 | w | |
120 | 170 | 78 | 1111000 | x | |
121 | 171 | 79 | 1111001 | y | |
122 | 172 | 7A | 1111010 | z | |
123 | 173 | 7B | 1111011 | { | |
124 | 174 | 7C | 1111100 | | | |
125 | 175 | 7D | 1111101 | } | |
126 | 176 | 7E | 1111110 | ~ | |
127 | 177 | 7F | 1111111 | DEL | (Delete) |
Use another coding table, such as Unicode or in Europe the norm ISO/CEI 8859-1 Latin which includes the ASCII table in its first part (from 0 to 127) then specific characters for the following numbers (128-255).
0_ | ||||||||||||||||
1_ | ||||||||||||||||
2_ | ␣ | ! | " | # | $ | % | & | ' | ( | ) | * | + | , | - | . | / |
3_ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | : | ; | < | = | > | ? |
4_ | @ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O |
5_ | P | Q | R | S | T | U | V | W | X | Y | Z | [ | \ | ] | ^ | _ |
6_ | ` | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o |
7_ | p | q | r | s | t | u | v | w | x | y | z | { | | | } | ~ | |
8_ | ||||||||||||||||
9_ | ||||||||||||||||
A_ | ⌴ | ¡ | ¢ | £ | ¤ | ¥ | ¦ | § | ¨ | © | ª | « | ¬ | - | ® | ¯ |
B_ | ° | ± | ² | ³ | ´ | µ | ¶ | · | ¸ | ¹ | º | » | ¼ | ½ | ¾ | ¿ |
C_ | À | Á | Â | Ã | Ä | Å | Æ | Ç | È | É | Ê | Ë | Ì | Í | Î | Ï |
D_ | Ð | Ñ | Ò | Ó | Ô | Õ | Ö | × | Ø | Ù | Ú | Û | Ü | Ý | Þ | ß |
E_ | à | á | â | ã | ä | å | æ | ç | è | é | ê | ë | ì | í | î | ï |
F_ | ð | ñ | ò | ó | ô | õ | ö | ÷ | ø | ù | ú | û | ü | ý | þ | ÿ |
All non-visible characters are control characters (see ASCII table from 1 to 31)
dCode retains ownership of the "ASCII Code" source code. Except explicit open source licence (indicated Creative Commons / free), the "ASCII Code" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or the "ASCII Code" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "ASCII Code" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.
Cite dCode
The copy-paste of the page "ASCII Code" or any of its results, is allowed as long as you cite dCode! Cite as source (bibliography):
ASCII Code on dCode.fr [online website], retrieved on 2022-08-02, //www.dcode.fr/ascii-code
Summary
▲
Feedback