Octal to Hex

Convert octal values to hexadecimal with control over case and prefixes.

Octal
Hexadecimal
Runs locally in your browser

About the Octal to Hex

Going from octal to hex means regrouping bits from triples into nibbles. Octal 755 is 111 101 101, which regrouped from the right becomes 1 1110 1101 and reads as 1ED. Doing that by hand is error prone because the group boundaries shift, which is exactly the kind of arithmetic worth handing to a converter.

Values are read as arbitrary precision integers, so long octal strings such as file offsets or legacy PDP era constants keep every digit intact. A 0o prefix or a bare leading zero is accepted. Because octal stops at 7, any 8 or 9 in the input is flagged immediately with the character and the line quoted back to you, which catches the common mistake of pasting decimal into an octal field.

Output defaults to upper case hex, the convention in most datasheets and hex editors. Switch on Lowercase hex when you are generating CSS colours or JSON where lower case is more usual. Group digits spaces the result into byte pairs so a long value can be read against a memory dump, and Add base prefix emits 0x form for source code. When several bases matter at once, the All Base Converter prints them side by side, and Hex to Octal runs this conversion backwards.

How to use

  1. Paste your octal values into the left pane, one per line.
  2. Choose Lowercase hex if your target format expects it.
  3. Tick Group digits to split the hex into byte pairs.
  4. Copy the hexadecimal column or download it.

Common questions

How many hex digits will I get?
Roughly three quarters of the octal digit count, since each hex digit carries four bits against octal three. Exact length depends on the leading digit.
Why is my output upper case?
Upper case is the default because datasheets and hex editors use it. Tick Lowercase hex to change that.
Can I convert a chmod mode to hex?
Yes, 755 becomes 1ED. That form is rarely useful for chmod itself but shows up when permission bits are packed into a struct.
Are underscores allowed in the input?
Yes. Underscores, spaces and commas inside a line are stripped before the value is parsed.