Octal to Hex Converter

Convert octal whole numbers to hexadecimal exactly, or switch directions to decode hexadecimal values back to octal.

Last updated: August 2026 | By Workshelve Team

Base 8 to base 16

Octal uses eight digit values and hexadecimal uses sixteen. The converter preserves the integer while rewriting it in base 16.

Three bits become four

Each octal digit maps to three binary bits. Regrouping those bits into sets of four produces hexadecimal digits.

Useful for legacy notation

Octal still appears in technical contexts such as Unix-style permission notation, while hexadecimal is common for compact binary-oriented values.

How to Convert Octal to Hexadecimal

Octal is base 8, so every digit is from 0 through 7. Hexadecimal is base 16 and extends 0–9 with A–F. Because both bases are powers of two, binary gives a clean way to move between them.

Replace each octal digit with three binary bits. Join the groups, then regroup the bit string into four-bit sets starting from the right. Add leading zeros to the leftmost group if needed. Each four-bit group becomes one hexadecimal digit.

For example, 731₈ becomes 111 011 001₂. Regrouping as 0001 1101 1001 gives hexadecimal digits 1, D, and 9. Therefore 731₈ = 1D9₁₆.

Leading zero digits do not change an integer's magnitude, so 00731₈ and 731₈ produce the same hexadecimal integer. This is numeric conversion, not fixed-width byte formatting.

Octal to Hex Examples

10₈ → 8₁₆
25₈ → 15₁₆
144₈ → 64₁₆
377₈ → FF₁₆
755₈ → 1ED₁₆
1777₈ → 3FF₁₆

Worked Example: 731 Octal to HEX

7 → 111
3 → 011
1 → 001
111 011 001 → 0001 1101 1001
0001 → 1, 1101 → D, 1001 → 9
731₈ = 1D9₁₆

Octal to Hex FAQs

Which digits can I enter in an octal number?

Only 0 through 7. Digits 8 and 9 are not part of base-8 notation and are rejected rather than removed.

How do three octal bits become hexadecimal digits?

Each octal digit expands to three binary bits. After joining the bits, regroup from the right in sets of four; each four-bit group maps to one hexadecimal digit.

Why does octal 377 equal hexadecimal FF?

377₈ is binary 011 111 111. Regrouped into four-bit units, that is 1111 1111, which maps to F F in hexadecimal.

Do leading zeros in octal change the HEX result?

Not for an integer conversion. Leading zero digits do not change the magnitude, so 0377₈ and 377₈ both convert to FF₁₆.

Can I enter a negative octal integer?

Yes. A leading minus sign is treated as the mathematical sign, so -377₈ converts to -FF₁₆. The tool does not infer a two’s-complement width.

Why might octal notation appear in Unix permissions?

Permission bits are naturally grouped in threes, and each three-bit group maps to one octal digit. This converter treats an entry such as 755 as the numeric octal value; it does not interpret permission semantics.

Does this converter preserve leading-zero width?

No. It preserves numeric value, not display width. If fixed-width formatting matters, add the required leading zeros after conversion.

Can large octal integers be converted exactly?

Yes, within practical browser limits. The validated integer is converted with BigInt instead of floating-point Number arithmetic.

Related Tools