Convert octal to hexadecimal via binary: 3-bit octal groups merge into 4-bit hex nibbles. Exact for any length, with the intermediate binary shown.
Show calculation steps
Processed privately in your browser β nothing you paste is uploaded, logged or stored.
Threes into fours
The reverse regrouping: each octal digit unfolds to three bits, the string re-slices into four-bit nibbles (left-padded as needed), and each nibble names a hex digit. One value, re-dressed β exact by construction.
Because 3 and 4 share no factor, the regrouping shuffles every boundary: single octal digits do not map to single hex digits, which is why the bit-string intermediate is unavoidable and worth seeing.
Worked example
Input: 764 Unfold: 7β111 6β110 4β100 Bits: 111110100 Pad+group: 0001 1111 0100 Hex: 1 F 4 β 1F4
Sanity by lengths
n octal digits β 3n bits β 3n/4 hex digits: expect roughly a quarter shrinkage. Three octal digits fitting in three hex digits (as here) happens when leading bits pad away; large masks like 0o7777 grow no shorter (0xFFF).
Field notes
The living use is permissions-to-hex for APIs and languages that print modes in hex, plus the archaeology direction β lifting octal constants from vintage listings into modern hex-centric code. Both directions round-trip perfectly, which the paired page demonstrates.
Exactness and privacy
Digits 8/9 rejected with positions; unbounded length; bit-level fidelity guaranteed by the method itself. Local computation, nothing stored.
The 12-bit trick
Octal digits carry three bits and hex digits carry four, so the two systems line up every twelve bits — the least common multiple. The conversion therefore never needs decimal: expand each octal digit to three bits, then regroup the same bit string four at a time. Take 755₈: it expands to 111 101 101, which regroups as 0001 1110 1101, giving 1ED₁₆. The steps panel prints both groupings for your own input so you can watch the bits reshuffle.
How to use the Octal to Hex Converter
- Enter the octal value (digits 0-7).
- Click "Convert to hex".
- The steps expand each octal digit to 3 bits, then regroup the bit string in 4s for hex.
- Copy the hex result.
Frequently asked questions
How does 764 become 1F4?
Expand: 7β111, 6β110, 4β100 giving 111110100. Regroup in fours from the right: 1 1111 0100 β pad β 0001 1111 0100 β 1, F, 4. The steps perform this on your number.
Why regroup from the right, padding on the left?
Place values anchor at the ones position on the right; padding must therefore extend the high end, where zeros are valueless. Right-padding would multiply the number by powers of two.
Is octal-to-hex ever needed outside coursework?
Occasionally – migrating legacy octal-documented formats (old core dumps, PDP-heritage specs) into modern hex-centric tooling, and permission masks into APIs that print hex.
Do the two bases share any digits reliably?
Values 0-7 look identical in both, which is a trap: "17" is 15 in octal but 23 in hex. Always carry the base label; the explicit prefixes 0o and 0x exist for exactly this reason.
How big can the input be?
Any size – a 40-digit octal expands to 120 bits and regroups exactly. Structure, not arithmetic, so no precision ceiling exists.
What is the quickest hand-check?
Compare bit counts: n octal digits β 3n bits β 3n/4 hex digits. If your output length is far from that, a digit slipped somewhere.
Local processing?
Yes – the expansion and regrouping run in the page. Nothing is sent to any server.