Hex to Octal Converter

Type a hex number to get its octal value. The working goes through binary, which is the easiest way to do it by hand.

Hex numbers use 0 to 9 and A to F (upper or lower case). A 0x prefix is fine.

Octal result
Result appears as you type

How to convert hex to octal by hand

Example 1: 1F in hex is 37 in octal

Step 1: Hex to binary: write each digit as 4 bits

Because 16 = 2⁴, every hex digit maps to exactly 4 binary digits. Drop any leading zeros at the end.

Hex digitValue4 bits
110001
F151111

0001 1111 → 11111

Step 2: Binary to octal: group the bits in 3s

Because 8 = 2³, every 3 bits make exactly one octal digit. Start from the right and pad the leftmost group with zeros if needed.

3-bit groupValueOctal digit
01133
11177

011 111 → 37

Example 2: 1ED in hex is 755 in octal

Step 1: Hex to binary: write each digit as 4 bits

Because 16 = 2⁴, every hex digit maps to exactly 4 binary digits. Drop any leading zeros at the end.

Hex digitValue4 bits
110001
E141110
D131101

0001 1110 1101 → 111101101

Step 2: Binary to octal: group the bits in 3s

Because 8 = 2³, every 3 bits make exactly one octal digit. Start from the right and pad the leftmost group with zeros if needed.

3-bit groupValueOctal digit
11177
10155
10155

111 101 101 → 755

Hex to Octal conversion table

HexOctalDecimal
000
111
222
333
444
555
666
777
8108
9119
A1210
B1311
C1412
D1513
E1614
F1715
102016
204032
4010064
64144100
80200128
FF377255
100400256
2001000512
3E817501000
40020001024

Where this conversion comes up

  • C and C++ character escapes: '\x41' and '\101' are both the letter A, one written in hex and one in octal.
  • Coursework that asks you to convert between hex and octal without going through decimal.

Frequently asked questions

What is the quickest way to convert hex to octal by hand?

Go through binary. Write each hex digit as 4 bits, then regroup the bits in threes from the right and write each group as an octal digit. It avoids any long division.

Can I convert negative numbers?

Yes. Put a minus sign in front and it is kept in the result, for example -1F becomes -37. The converter does not produce two's complement.

Is there a limit on how big the number can be?

No practical limit. The conversion uses arbitrary precision integers, so long values stay exact. The step-by-step working is shown for numbers up to 24 digits.

Can I convert fractions?

Not with this tool. It converts whole hex numbers to whole octal numbers.

Other number converters

Going the other way? Use the Octal to Hex Converter. To see a number in every base at once, try the all-in-one number converter.

Local Processing
End-to-End Encryption
Works Offline

Building Something Beyond This Tool?

We help teams design and build reliable web and mobile applications backed by well-structured APIs.