Octal to Hex Converter
Convert octal to hexadecimal instantly, exact at any size, with 0x prefixes and upper or lower case.
About this number
What It Does
This converter turns octal into hexadecimal. It expands the octal digits to bits, regroups them in fours and reads off hex digits — exactly, at any length. Output options add the 0x prefix, pad to whole bytes and choose upper or lower case, and permission-sized values also show their rwx meaning.
When to Use It
- You have an octal permission or mask and need it as a hex constant.
- You are translating constants from an octal-based system into modern code.
- You are checking a conversion done by hand through binary.
- You want a batch of octal values in hex.
Worked Examples
755
1ED in hex: 111 101 101 regrouped as 1 1110 1101.
377
FF — eight bits all set, a single byte.
0o20000
2000 in hex, 8192 in decimal.
Features
How to Use
1. Type or paste a octal number — or a list, one per line. 2. The hex value appears alongside, line for line. 3. Use the options to group digits or add a prefix, and the swap button to convert the other way.
Common Mistakes
- Converting a number through a JavaScript Number. Above 9,007,199,254,740,991 it silently rounds, so the last digits come out wrong. This tool uses BigInt and stays exact at any size.
- Forgetting that the same digits mean different values in different bases. 10 is ten in decimal, two in binary, eight in octal and sixteen in hex — always label which base a value is in.
- Treating a minus sign as how a computer stores a negative number. Hardware uses two's complement, so a negative value's bit pattern looks nothing like its positive counterpart.
Frequently Asked Questions
Related Tools
Conversion runs in your browser with exact integer arithmetic. Nothing is uploaded.