Convert octal to hexadecimal (octal to hex) as you type, with every step shown. This free online converter gives exact results for numbers of any size, and nothing you type leaves your browser.
1 Enter your value
From
To
0x
Examples
2 Your answer
Decimal
dec
Show in other bases
Tap any value to copy it.
See the working
Guide
How it works
Three steps, whether you are reading a memory address, a bit flag or a byte value.
1
Choose what to convert
Pick what you have and what you want: decimal, hexadecimal, binary or octal.
2
Type or paste a value
Write it however you like: 65,535, 0xFF, FFh, with commas, spaces or underscores.
3
Read the answer
It appears as you type, in every other base, with the working shown.
The formulas
A digit's value depends on its position. Every answer here uses one of these rules:
Octal to hexadecimal
go through binary: 3 bits per octal digit, 4 per hexadecimal digit
0o643 → 110 100 011 → 0001 1010 0011, so 0o643 is 0x1A3.
Hexadecimal to octal
go through binary: 4 bits per hexadecimal digit, 3 per octal digit
0x1A3 → 0001 1010 0011 → 110 100 011, so 0x1A3 is 0o643.
Octal to decimal
decimal = Σ digit × 8position
0o643 is 6 × 64 + 4 × 8 + 3 × 1 = 419, so the answer checks out.
Decimal to hexadecimal digit chart
The decimal values 0 to 15 are the single hexadecimal digits 0 to F. Click one to add it to the converter.
All conversions
Decimal, hexadecimal, binary and octal converter
One free tool for every direction. Use it as a decimal to hexadecimal converter, convert decimal to binary or octal, or work backwards as a hexadecimal to decimal converter that turns 0x to decimal values. It also converts hexadecimal to binary, binary to hexadecimal and octal to decimal, so it works as a full number base converter and hexadecimal calculator. Pick a conversion to start.
Use this octal to hexadecimal table as a quick octal to hexadecimal chart for common values, from 0 to 65,535.
Octal
Hexadecimal
0
0
1
1
2
2
3
3
4
4
5
5
6
6
7
7
10
8
11
9
12
A
13
B
14
C
15
D
16
E
17
F
20
10
40
20
100
40
144
64
177
7F
200
80
377
FF
400
100
1000
200
1750
3E8
2000
400
10000
1000
177777
FFFF
Help
Questions
Quick answers to what people most often ask about hexadecimal, decimal and binary.
01How do I convert octal to hexadecimal?
The easiest way to convert octal to hexadecimal is through binary. Write each octal digit as 3 bits. Then regroup the bits into groups of 4, starting from the right, and read each group as a hexadecimal digit.
02What is 377 in hexadecimal?
0o377 in octal is 0xFF in hexadecimal (255 in decimal). Type 377 into the converter above to see every step.
03What is 2000 in hexadecimal?
0o2000 in octal is 0x400 in hexadecimal (1,024 in decimal).
04What is 10 in hexadecimal?
0o10 in octal is 0x8 in hexadecimal (8 in decimal).
05What is 755 in hexadecimal?
0o755 in octal is 0x1ED in hexadecimal (493 in decimal). It is the 755 in chmod 755 (rwxr-xr-x).
06What is 777 in hexadecimal?
0o777 in octal is 0x1FF in hexadecimal (511 in decimal). It is the 777 in chmod 777: read, write and execute for everyone.
07Can I convert octal to hexadecimal without going through decimal?
Yes. Go through binary instead: write each octal digit as 3 bits, regroup the bits into groups of 4 from the right, and read each group as a hexadecimal digit. For example, 0x1A3 is 0001 1010 0011, which regroups to 110 100 011, or 0o643.
08How do I convert octal to hexadecimal in Excel?
Use the OCT2HEX function: =OCT2HEX("377") returns FF. It works the same way in Google Sheets. These functions only handle up to 10 input characters, and the binary ones only −512 to 511, so use this converter for larger numbers.
09How do I convert octal to hexadecimal in Python or JavaScript?
In Python, hex(int('377', 8)) returns '0xff'. In JavaScript, parseInt('377', 8).toString(16) returns 'ff'. Python handles any size; in JavaScript use BigInt for numbers above 2⁵³.
10Does the converter use two’s complement for negative numbers?
No. It keeps the minus sign, so −255 is −0xFF, −0b11111111 and −0o377. Computers usually store negative numbers in two’s complement, where the pattern depends on the width: −1 is 1111 1111 (0xFF) in 8 bits and 0xFFFF in 16 bits. To read a signed value whose top bit is set, subtract 2ⁿ: 0xFF as a signed 8-bit number is 255 − 256 = −1.
11Can I convert octal numbers with a fractional part?
The converter works with whole numbers. By hand, convert the fractional part by multiplying it by the target base again and again and keeping the whole-number part each time. For example, 0.5 × 16 = 8, so 0.5 is 0x0.8 in hexadecimal, 0b0.1 in binary and 0o0.4 in octal.
12How many hexadecimal digits are in a byte?
Two. One hexadecimal digit is 4 bits, so a byte (8 bits) is two digits, from 00 to FF (0 to 255). A 16-bit number is 4 digits, a 32-bit number is 8 and a 64-bit number is 16.
13Is there a limit to how big a octal number can be?
No. The converter uses exact whole-number arithmetic, so 64-bit, 128-bit and longer octal values convert to hexadecimal with every digit correct, with no rounding.
14What does “oct to hex” mean?
“oct to hex” is short for octal to hexadecimal, which means going from base 8 to base 16: a number written in base 8 is rewritten in base 16. For example, 0o377 becomes 0xFF.
15Does this octal to hexadecimal calculator show the working?
Yes. It converts octal to hexadecimal with steps: open “See the working” under the answer to see each digit multiplied by its power of 8, then the result written in hexadecimal. Every answer is also shown in decimal, hexadecimal, binary and octal at once.
16Is this octal to hexadecimal converter free?
Yes. It is free with no sign-up, works online on phones, tablets and computers, and every octal to hexadecimal conversion runs in your browser, so nothing you type is sent anywhere.