ASCII to Octal Converter

Converting ASCII to Octal

ASCII is one of the oldest character encodings, allowing for computers to represent binary numbers as text. Due to hardware limitations at the time of its inception, ASCII has only 128 code points, and only 95 of them are printable characters. For this reason, most modern computers use UTF-8, which represents the millions of code points covered by Unicode. However, UTF-8 has the same first 128 code points as ASCII, making UTF-8 an ASCII superset.

The steps to convert an ASCII character to an octal string are as follows:

  1. Obtain the character that you want to convert
  2. Find its corresponding decimal character using an ASCII table
  3. Convert the decimal number to a three digit octal number
  4. Repeat for any other characters

An ASCII table is provided below for your convenience.

Example: Encoding the letter "A" into octal

Using the ASCII table, the conversion is as follows:

"A" = 6510 = 64×1+1 = 64×82+0×81+1×80 = 1018

Alternate Encodings

ASCII is not the only encoding type used today. In its non-extended form, it only has the capability to represent 128 basic characters. To combat this, the UTF-8 encoding was created, capable of representing all 1,112,064 valid Unicode characters. Other, less popular encodings have been created, primarily for the purpose of better representing other script types, or as proprietary encodings for specific machines. This converter uses the UTF-8 encoding.

ASCII Table

ASCII CharacterHexadecimalBinaryDecimal
NUL00000000000
SOH01000000011
STX02000000102
ETX03000000113
EOT04000001004
ENQ05000001015
ACK06000001106
BEL07000001117
BS08000010008
HT09000010019
LF0A0000101010
VT0B0000101111
FF0C0000110012
CR0D0000110113
SO0E0000111014
SI0F0000111115
DLE100001000016
DC1110001000117
DC2120001001018
DC3130001001119
DC4140001010020
NAK150001010121
SYN160001011022
ETB170001011123
CAN180001100024
EM190001100125
SUB1A0001101026
ESC1B0001101127
FS1C0001110028
GS1D0001110129
RS1E0001111030
US1F0001111131
Space200010000032
!210010000133
"220010001034
#230010001135
$240010010036
%250010010137
&260010011038
'270010011139
(280010100040
)290010100141
*2A0010101042
+2B0010101143
,2C0010110044
-2D0010110145
.2E0010111046
/2F0010111147
0300011000048
1310011000149
2320011001050
3330011001151
4340011010052
5350011010153
6360011011054
7370011011155
8380011100056
9390011100157
:3A0011101058
;3B0011101159
<3C0011110060
=3D0011110161
>3E0011111062
?3F0011111163
@400100000064
A410100000165
B420100001066
C430100001167
D440100010068
E450100010169
F460100011070
G470100011171
H480100100072
I490100100173
J4A0100101074
K4B0100101175
L4C0100110076
M4D0100110177
N4E0100111078
O4F0100111179
P500101000080
Q510101000181
R520101001082
S530101001183
T540101010084
U550101010185
V560101011086
W570101011187
X580101100088
Y590101100189
Z5A0101101090
[5B0101101191
\5C0101110092
]5D0101110193
^5E0101111094
_5F0101111195
`600110000096
a610110000197
b620110001098
c630110001199
d6401100100100
e6501100101101
f6601100110102
g6701100111103
h6801101000104
i6901101001105
j6A01101010106
k6B01101011107
l6C01101100108
m6D01101101109
n6E01101110110
o6F01101111111
p7001110000112
q7101110001113
r7201110010114
s7301110011115
t7401110100116
u7501110101117
v7601110110118
w7701110111119
x7801111000120
y7901111001121
z7A01111010122
{7B01111011123
|7C01111100124
}7D01111101125
~7E01111110126
DEL7F01111111127