DevSwitch.net
Back to Tools
#

Octal to Hexadecimal Converter

Convert octal numbers to hexadecimal format

Number Converters

Tip: Enter an octal number (0-7 only). The conversion happens in real-time.

Runs in your browser

Octal Hex

Hex base 16
-
Try

Convert octal to hexadecimal

Type an octal number and the hex result appears as you type, in capital letters. Results longer than four digits are also split into byte pairs, and the window bar shows the bit length.

Octal digits are three bits and hex digits four, so no octal digit has a matching hex digit. The conversion goes through binary: the bits stay the same, only the way they are grouped changes.

How to convert octal to hex by hand

Write each octal digit as three bits, regroup the bits in fours from the right, and write each group as a hex digit. For 755:

StageResult
Octal digits 7 5 5
Three bits each 111 101 101
Regrouped in fours from the right 0001 1110 1101
Hex digits 1 E D

So 755 in octal is 1ED in hex. Both are 493 in decimal, which is a quick way to check the answer.

Octal to hex table

OctalHex
7 7
10 8
17 F
20 10
37 1F
77 3F
100 40
177 7F
200 80
377 FF
644 1A4
755 1ED
777 1FF
177777 FFFF

377 and FF are the pair you meet most: both are 255, the largest value of one byte. Permissions such as 644 turn into 1A4 in hex, which shows why they are kept in octal: the hex form hides the three user classes.

Converting hex to octal instead?

The hex to octal converter writes each hex digit as four bits and regroups them in threes.

For the decimal value, use the octal to decimal converter; the number system converter shows all four bases at once.

Octal to hex questions

FF. 377 is 11 111 111 in binary; regrouped as 1111 1111 that is F and F.

An octal digit is three bits and a hex digit four, so their boundaries only meet every 12 bits: every four octal digits or three hex digits.

No. You get the digits in capitals, such as 1ED. Add 0x yourself if your code needs it.

Yes. 0o755 and 755 both give 1ED, and spaces and underscores are skipped too.

No. The conversion runs in your browser.