Tool to convert ASCII (binary, octal, decimal, hexadecimal), a character coding system that are numbered from 0 to 127 and coded in binary on 7 bits from 0000000 to 1111111.
ASCII Code - dCode
Tag(s) : Character Encoding
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The ASCII (American Standard Code for Information Interchange) character encoding standard is an encoding system that assigns a unique numerical code to each character (letters, numbers, symbols) on a computer, which facilitates the exchange of data between different computer systems.
This standard was defined in 1975 and contains 128 7-bit codes including 95 printable characters (i.e. the vast majority of characters allowing writing in English, but not fully in other languages, there are no accents for example).
Today this standard is outdated and supplanted by Unicode, which is backward compatible with ASCII.
Encoding/Encryption consists of replacing/translating each character with its value in the ASCII table (see below). This value can be written in several formats, depending on the needs, such as decimal, binary, hexadecimal or even octal.
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 decoding/conversion consists of replacing/translating each value (binary, octal, decimal or hexadecimal) with the corresponding character in the ASCII table. Its representation can be independently formatted into binary (0-1), octal (0-7), decimal (0-9) or hexadecimal (0-9a-f).
Example:
ASCII Values (Format) | Texte clair |
---|---|
65 77 69 82 73 67 65 78 (Decimal) | AMERICAN |
83 116 97 110 100 97 114 100 (Decimal) | Standard |
1000011 1001111 1000100 1000101 (7-bit Binary) | CODE |
01100011 01101111 01100100 01100101 (8-bit Binary) | 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 values are between 0 and 127 (decimal), the most common/frequent, corresponding to usual characters such as uppercase or lowercase letters are between 65 and 122 (decimal).
Any reference to skiing (ASCII ≈ a ski) or sky is a clue.
Computer languages usually use functions like fromCharCode(), CharCode(), Chr()
The ASCII table assigns a unique numeric code to each character, but this code (between 0 and 127) can be written in multiple ways depending on the needs.
— BIN: writing in binary base 2 (from 0 to 1111111)
— BIN /7: division every 7 bits (from 0000000 to 1111111)
— BIN /8: division every 8 bits (from 00000000 to 01111111)
— BIN /1-7: adaptive splitting between 1 and 7 bits
— BIN /1-8: adaptive splitting between 1 and 8 bits
— BIN /N: adaptive slicing from 1 to N bits
— OCT: writing in octal base 8 from (0 to 177)
— OCT /3: division every 3 digits (from 000 to 177)
— OCT /1-3: adaptive splitting of 1 to 3 octal digits
— OCT /N: adaptive slicing from 1 to N octal digits
— DEC: writing in decimal base 10 from (0 to 127)
— DEC /2: division every 2 digits (from 0 to 99, message without lower case)
— DEC /3: division every 3 digits (from 000 to 127)
— DEC /1-3: adaptive division of 1 to 3 digits
— DEC /N: adaptive division from 1 to N digits
— HEX: writing in base 16 hexadecimal (from 0 to 7F)
— HEX /2: division every 2 characters (from 00 to 7F)
— HEX /N: adaptive splitting from 1 to N hexadecimal digits
Numbers or characters that would not be valid in bases 2,8,10,16 are ignored.
Sometimes the symbols ⥅0 or ⥆0 are displayed, they mean that initial or final 0 have been added to allow decoding.
An ASCII code is represented on 7 bits, which allows 128 different characters to be represented.
In practice, 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=01000001 (65) and a=01100001 (65+32=97)
This trick does not work for accented letters, which are not in the basic ASCII table
Full 7-bit ASCII table
Decimal | Octal | Hex | Binary | Character | Info |
---|---|---|---|---|---|
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) |
The values from 128 to 255 do not exist in the ASCII table. There are other tables often called extended ASCII which complement the ASCII code but are not ASCII.
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 | _4 | _5 | _6 | _7 | _8 | _9 | _A | _B | _C | _D | _E | _F | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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)
The main difference between ASCII and Unicode is the range of characters they can represent. ASCII uses a character table of 128 codes, which is suitable for representing basic English characters. In contrast, Unicode is a newer standard that uses a much larger character table, allowing thousands of characters used in different languages and scripts around the world to be represented.
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, breaker, 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.
The copy-paste of the page "ASCII Code" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
ASCII Code on dCode.fr [online website], retrieved on 2024-11-16,