Guide
Hex to octal by regrouping bits
Converting between two bases that are both powers of two sounds like it should be easy, and it is, but only through the right middle step. Hexadecimal groups bits in fours and octal groups them in threes, so there is no digit-for-digit rule between them. The reliable method is to go through the bits, and this page shows that route explicitly.
Step one: expand to bits
Write each hexadecimal digit as four bits. The digit F is 1111, 4 is 0100, A is 1010 and so on. Join the groups to get the full bit string of the number. This stage is lossless because both representations describe the same bits.
Step two: regroup into threes
Starting from the binary point and moving outward, cut the string into groups of three. If the first group on the left is short, pad it on the left with zeros; if the last group after the point is short, pad it on the right. Each group of three is an octal digit from 0 to 7. The working on this page prints the regrouped bits and the digit for each, which also shows exactly where padding happened.
Why the groups drift
Since 4 and 3 share no factor, the borders of the hex groups and of the octal groups only coincide every 12 bits. That is why a hex value like FF, eight bits, turns into 377, where the leftmost octal digit is only two bits wide, and why you cannot simply read an octal digit off one hex digit. The picture on the page, with both rows of groups, makes the drift visible.
Options
Choose a 0o prefix on the octal result, and group the digits of long answers. Hex input can be upper or lower case, may have a 0x prefix, and may contain spaces or underscores. You can enter a list, one number per line; the working shows the first line. The box underneath gives decimal, binary and base 36 for the same number.
A worked example
The Sample button loads 1F4A.8. As bits, 1 is 0001, F is 1111, 4 is 0100 and A is 1010, and after the point 8 is 1000. Regrouped from the point: the integer bits, with leading zeros dropped, are 1 1111 0100 1010 and are padded to 001 111 101 001 010; the fraction bits 1000 are padded to 100 000, which is read as 4 and 0, and the trailing zero is removed. The digits are 1, 7, 5, 1, 2 and then .4, so the octal number is 17512.4. In decimal it is 8010.5, matching the hex-to-decimal page.
Limits
The page changes the representation, not the meaning. It does not know whether the value is an address, a colour or a mask, and it does not wrap values to a word size. For an exercise you may need to show the working in a particular style; use the lines on the page as a model and rewrite them in your own words. If you only need to check a conversion, the decimal figure in the comparison box is a quick sanity test.
Related tools
- Octal to Hex goes the other way, from threes to fours.
- Hex to Binary stops after the first step, expanding to bits.
- Binary to Octal covers the second step on its own.
- Number Base Converter converts between any two bases from 2 to 36.
Checked against the current version of the Hex to Octal on .

