ASCII Converter
“ASCII converter” means two things: a picture turned into characters, or the code behind a character. This page is the code half — the art half is on the front page.
A character into its code
Separate the numbers with spaces, commas or line breaks. A token starting
0x, 0b or 0o is read in that base whatever is
selected here.
Decimal 72 105 33 Hex 48 69 21 Octal 110 151 41 Binary 01001000 01101001 00100001
Type or paste text and it prints each character’s code in all four bases at once; switch direction and it reads codes back into text. Switching direction moves the result into the box, so you can convert straight back and see that you get what you started with. It runs entirely in this tab — there is no request of any kind behind it.
Printable ASCII, 32 to 126
Ninety-five characters: the space, thirty-two punctuation marks, ten digits and both cases of the Latin alphabet. Decimal is what a specification quotes, hexadecimal is what a hex editor shows, octal survives in file permissions and in C escapes, and the binary is padded to eight bits so that a byte looks like a byte — ASCII itself only needs seven, and the leading zero is always a zero.
| Char | Dec | Hex | Oct | Binary |
|---|---|---|---|---|
| space | 32 | 20 | 40 | 00100000 |
| ! | 33 | 21 | 41 | 00100001 |
| " | 34 | 22 | 42 | 00100010 |
| # | 35 | 23 | 43 | 00100011 |
| $ | 36 | 24 | 44 | 00100100 |
| % | 37 | 25 | 45 | 00100101 |
| & | 38 | 26 | 46 | 00100110 |
| ' | 39 | 27 | 47 | 00100111 |
| ( | 40 | 28 | 50 | 00101000 |
| ) | 41 | 29 | 51 | 00101001 |
| * | 42 | 2A | 52 | 00101010 |
| + | 43 | 2B | 53 | 00101011 |
| , | 44 | 2C | 54 | 00101100 |
| - | 45 | 2D | 55 | 00101101 |
| . | 46 | 2E | 56 | 00101110 |
| / | 47 | 2F | 57 | 00101111 |
| 0 | 48 | 30 | 60 | 00110000 |
| 1 | 49 | 31 | 61 | 00110001 |
| 2 | 50 | 32 | 62 | 00110010 |
| 3 | 51 | 33 | 63 | 00110011 |
| 4 | 52 | 34 | 64 | 00110100 |
| 5 | 53 | 35 | 65 | 00110101 |
| 6 | 54 | 36 | 66 | 00110110 |
| 7 | 55 | 37 | 67 | 00110111 |
| 8 | 56 | 38 | 70 | 00111000 |
| 9 | 57 | 39 | 71 | 00111001 |
| : | 58 | 3A | 72 | 00111010 |
| ; | 59 | 3B | 73 | 00111011 |
| < | 60 | 3C | 74 | 00111100 |
| = | 61 | 3D | 75 | 00111101 |
| > | 62 | 3E | 76 | 00111110 |
| ? | 63 | 3F | 77 | 00111111 |
| Char | Dec | Hex | Oct | Binary |
|---|---|---|---|---|
| @ | 64 | 40 | 100 | 01000000 |
| A | 65 | 41 | 101 | 01000001 |
| B | 66 | 42 | 102 | 01000010 |
| C | 67 | 43 | 103 | 01000011 |
| D | 68 | 44 | 104 | 01000100 |
| E | 69 | 45 | 105 | 01000101 |
| F | 70 | 46 | 106 | 01000110 |
| G | 71 | 47 | 107 | 01000111 |
| H | 72 | 48 | 110 | 01001000 |
| I | 73 | 49 | 111 | 01001001 |
| J | 74 | 4A | 112 | 01001010 |
| K | 75 | 4B | 113 | 01001011 |
| L | 76 | 4C | 114 | 01001100 |
| M | 77 | 4D | 115 | 01001101 |
| N | 78 | 4E | 116 | 01001110 |
| O | 79 | 4F | 117 | 01001111 |
| P | 80 | 50 | 120 | 01010000 |
| Q | 81 | 51 | 121 | 01010001 |
| R | 82 | 52 | 122 | 01010010 |
| S | 83 | 53 | 123 | 01010011 |
| T | 84 | 54 | 124 | 01010100 |
| U | 85 | 55 | 125 | 01010101 |
| V | 86 | 56 | 126 | 01010110 |
| W | 87 | 57 | 127 | 01010111 |
| X | 88 | 58 | 130 | 01011000 |
| Y | 89 | 59 | 131 | 01011001 |
| Z | 90 | 5A | 132 | 01011010 |
| [ | 91 | 5B | 133 | 01011011 |
| \ | 92 | 5C | 134 | 01011100 |
| ] | 93 | 5D | 135 | 01011101 |
| ^ | 94 | 5E | 136 | 01011110 |
| _ | 95 | 5F | 137 | 01011111 |
| Char | Dec | Hex | Oct | Binary |
|---|---|---|---|---|
| ` | 96 | 60 | 140 | 01100000 |
| a | 97 | 61 | 141 | 01100001 |
| b | 98 | 62 | 142 | 01100010 |
| c | 99 | 63 | 143 | 01100011 |
| d | 100 | 64 | 144 | 01100100 |
| e | 101 | 65 | 145 | 01100101 |
| f | 102 | 66 | 146 | 01100110 |
| g | 103 | 67 | 147 | 01100111 |
| h | 104 | 68 | 150 | 01101000 |
| i | 105 | 69 | 151 | 01101001 |
| j | 106 | 6A | 152 | 01101010 |
| k | 107 | 6B | 153 | 01101011 |
| l | 108 | 6C | 154 | 01101100 |
| m | 109 | 6D | 155 | 01101101 |
| n | 110 | 6E | 156 | 01101110 |
| o | 111 | 6F | 157 | 01101111 |
| p | 112 | 70 | 160 | 01110000 |
| q | 113 | 71 | 161 | 01110001 |
| r | 114 | 72 | 162 | 01110010 |
| s | 115 | 73 | 163 | 01110011 |
| t | 116 | 74 | 164 | 01110100 |
| u | 117 | 75 | 165 | 01110101 |
| v | 118 | 76 | 166 | 01110110 |
| w | 119 | 77 | 167 | 01110111 |
| x | 120 | 78 | 170 | 01111000 |
| y | 121 | 79 | 171 | 01111001 |
| z | 122 | 7A | 172 | 01111010 |
| { | 123 | 7B | 173 | 01111011 |
| | | 124 | 7C | 174 | 01111100 |
| } | 125 | 7D | 175 | 01111101 |
| ~ | 126 | 7E | 176 | 01111110 |
The codes below 32, and why 127 is DEL
Nothing under 32 prints. They were instructions to a teleprinter and several are still doing that job: 7 rings a bell, 8 backspaces, 9 tabs, 10 feeds a line, 13 returns the carriage, 0 is NUL, and 27 is escape — every ANSI color code this site can export begins with it. They have no glyphs, which is why they are not in the table.
127 is the odd one. It is a control code, DEL, but it sits at the top of the range instead of
down with the others, and the reason is paper tape. 127 is 1111111: every hole
in the row punched. A hole cannot be un-punched, so deleting a character already committed to
the tape meant punching out every position it had, and readers were told to ignore that
pattern. Delete had to be the all-ones code, which is why the printable range stops one short
of the end.
How the converter works
The character-code converter walks the text one code point at a time and writes each one out in base ten, sixteen, eight and two. Line breaks are converted too — a line break is code 10, and the output is laid out one line per line of your text so that a multi-line paste stays readable. Going the other way, it splits on whitespace and commas, reads each token in the base you chose unless the token names its own, and refuses anything that is not a number in that base rather than guessing.
One honest caveat, and the converter states it on the page as well: above 127 what you get is
the Unicode code point, not an ASCII code and not a byte. The first 128 code points of
Unicode are the ASCII ones, and UTF-8 was built so that those 128 are still one byte each and
still the same number — which is the whole reason ASCII text is already valid UTF-8. Above
that the agreement stops: é is code point 233 and two bytes, and 😀
is code point 128512 and four.
A worked example
The three characters the code box starts with, Hi!: decimal 72 105 33,
hexadecimal 48 69 21, octal 110 151 41, binary 01001000 01101001 00100001. That capital
H is 72 and a lower-case h is 104 — a difference of 32, which is a
single bit. Every letter’s lower-case code is its upper-case code with that bit set, which is
why changing case used to be an OR rather than a table lookup.
Questions
What does an ASCII converter do?
Two different things, depending on who is asking. One kind turns a picture into ASCII art — characters arranged so that, from a distance, they make a shape; that one is on the front page, with six modes and no upload. The other turns a character into its ASCII code, the number the computer actually stores: 65 for A, 41 in hexadecimal. That is this page.
What is the ASCII code for a character?
Type it into the character-code box and you get the decimal, hexadecimal, octal and binary code at once. A is 65, a is 97, a space is 32, and the digit 0 is 48 — digits are not their own values, which is why subtracting 48 turns up in so much old C. The whole printable range is tabulated on this page.
How do I convert binary back to text?
Switch the character-code converter to “Codes to text”, choose Binary, and paste the numbers in, separated by spaces, commas or line breaks. 01001000 01101001 comes back as Hi. A token written 0x48, 0b1001000 or 0o110 is read in the base its prefix names whatever the buttons say, so a mixed list still works.
Why does my character have a code above 127?
Because it is not ASCII. ASCII is a seven-bit code with 128 positions, 0 to 127, and that is the whole of it: no accented letters, no curly quotes, no emoji. é is Unicode code point U+00E9, 233; 😀 is U+1F600, 128512. The converter reports the code point and says which characters are Unicode rather than quietly passing the number off as an ASCII code.
Is anything I type here sent anywhere?
No. The character-code converter is arithmetic on the string in the box: no request, no dependency, nothing stored. Once the page has loaded you can take the network away entirely and it still works. The image converter on the front page is the same promise for the same reason — your browser decodes the file and a worker in that tab converts it, because there is nowhere to send it to.
Which characters are printable ASCII?
Codes 32 to 126: the space, thirty-two punctuation marks, the ten digits and the two cases of the Latin alphabet — 95 characters. Everything below 32 is a control code that prints nothing, and 127 is DEL. The table on this page lists all 95 with their decimal, hexadecimal, octal and binary codes.
Where else to go
If what you came for was the other reading of the word — a picture turned into characters rather than a character turned into a number — it is on the front page, and everything about it is there too: six modes with real output under each, from plain shading through dithering, edge detection, outline, which draws one character per stroke instead of one per side of it, braille, which packs a two-by-four grid of dots into every character, and color as HTML, 24-bit ANSI or half-blocks. Nothing is uploaded there either.
Sizes are chosen in columns and the rows follow from them, which is the one part of that tool worth knowing before you open it: five presets from 24 columns to 240, a slider and a box to type an exact width into, and a readout giving the character count as well as the grid — the number that says whether a piece will fit a 2,000-character Discord message. What each size is for is set out there.
The rest of the site is short. About says who made this and why there are no accounts, credits lists the two fonts and their licenses, and privacy names in a table every event the site records — none of which can carry what you type into the box above, because nothing here leaves the tab.