Hex to octal converter

Type a hex number such as 1A3 or FF to get it in octal. FF becomes 377. The # and 0x prefixes are fine, and you can paste one value per line.

Show the working
One number per line, or separate them with spaces.0 numbers
Reviewed bySam Siewert
Last updated · How we test

Runs in your browser. Nothing you type is uploaded.

How to convert hex to octal

  1. Write each hex digit as 4 bits, the same step the hex to binary converter does. A is 1010, 3 is 0011, F is 1111.
  2. Join the bits into one long binary number.
  3. Split the bits into groups of 3 from the right. Add zeros on the left if the first group is short.
  4. Write each group of 3 bits as one octal digit from 0 to 7. Steps 3 and 4 are what the binary to octal converter does.

This works because 16 is 24 and 8 is 23, so both line up with whole bits. You never need to divide. "Show the working" under the tool draws both groupings for the first number.

Hex to octal example: 1A3 becomes the bits 0001 1010 0011. Regrouped in threes from the right, the bits are 110, 100 and 011, which are the octal digits 6, 4 and 3, so the answer is 643.

Hexadecimal to octal example

Take ABC. A, B and C are 1010, 1011 and 1100, which join to 101010111100. In threes from the right that is 101 010 111 100, or 5 2 7 4. So ABC in hex is 5274 in octal. Both are 2748 in decimal, which you can check with the hex to decimal converter.

HexBinaryOctalDecimal
81000108
F11111715
7B1111011173123
FF11111111377255
1A3110100011643419
ABC10101011110052742748
FFFF111111111111111117777765535

Hex, binary and octal chart

Table of hex digits with binary, decimal and octal: 0 to 7 are the same in all three, 8 is 1000 or 10 in octal, A is 1010 or 12, and F is 1111, 15 in decimal and 17 in octal.

Digits 0 to 7 are the same in hex and octal. From 8 up they split: hex 8 is octal 10, hex A is octal 12 and hex F is octal 17.

Octal to hex

The reverse uses the same idea. Write each octal digit as 3 bits, then regroup the bits in fours. 755 is 111 101 101, regrouped as 1 1110 1101, which is 1ED in hex. The base converter can do that direction: set From to 8 and To to 16.

Frequently asked questions

How do you convert hexadecimal to octal?

Turn each hex digit into 4 bits, join them, regroup the bits in threes from the right and turn each group into an octal digit.

What is FF in octal?

377. FF is 11111111, which regroups as 011 111 111.

What is 8 in hexadecimal and octal?

8 is written 8 in hex and 10 in octal.

Can I convert hex to octal through decimal?

Yes, it gives the same answer, but it needs long division. Going through binary is faster by hand.

Does the tool accept 0x and #?

Yes. 0xFF, #FF and FF all give 377. Pick "0o prefix" under Output to write the answer as 0o377.

Scroll to Top