Octal to Hexadecimal Converter

developer · number system

Convert Octal to Hexadecimal with a fixed input and output format, step-by-step formulas under the result, and reference tables. Parsing matches the main hub (0b, 0x, leading 0 for octal; one optional . for fractional digits on numeric bases; single character for character mode).

Calculator

From: Octal

To: Hexadecimal

Formulas

Enter a value → place-value expansion + division chain.

About Octal

Octal (base 8) uses digits 0–7. A leading 0 denotes octal in this converter (e.g. 0777). One radix point is allowed; fractional places use 8⁻¹, 8⁻², …. Grouping binary digits in threes maps cleanly to octal, which is why Unix file permissions often use it.

About Hexadecimal

Hexadecimal (base 16) uses 0–9 and A–F. This tool accepts an optional 0x prefix. One radix point is allowed; fractional digits use 16⁻¹, 16⁻², …. Each hex digit covers four bits, so it is compact for memory addresses, colors, and byte dumps.

How to convert octal to hexadecimal

Three steps: symbols → the right math move for this pair → worked examples you can copy on paper. Numeric bases (binary, octal, decimal, hex) also support one radix point and digits after it; character mode stays a single code unit.

Step 1 — Identify the symbols

Input (Octal): Each digit is 0–7 (eight possibilities per position).

Output (Hexadecimal): Digits 0–9 plus letters A–F for values ten through fifteen.

Hex conversions use this letter-to-number map:

Hex digit → value (for place weights)
DigitValueDigitValue
0088
1199
22A10
33B11
44C12
55D13
66E14
77F15
Dev note
  • A leading 0 is often used to mark octal (e.g. 012).
  • 0x is a common prefix (e.g. 0xFF).

Step 2 — The Two-Step Method (via Decimal)

First express the left format as a decimal value (one optional . for a fractional part is allowed on numeric bases), then rewrite that value in the right format. The calculator automates both steps.

Part A — Into decimal

Number positions from the right, starting at 0. At each position, multiply that digit by 8 raised to the position index, then add every term. The total is your decimal number.

Digits after the dot: use negative powers of 8 (8−1, 8−2, …). Each place is still (digit × weight); add the fractional side to the whole side.

Part B — Out of decimal

Repeated division by 16: each remainder is one hex digit; values 10– 15 become A–F. Read remainders from last step to first.

Fractional decimal values: convert the whole part with repeated division, then multiply the fractional part by the target base over and over; each integer you get is the next digit after the radix point (same idea the calculator shows in Formulas).

Step 3 — Worked examples

Two practice values in Octal, converted to Hexadecimal using the same rules as Step 2. Example 3 uses a fractional part (digits after the radix point); the hub and pair calculators accept a single . on binary, octal, decimal, and hex inputs.

Example 1

"12" (Octal) → Hexadecimal.

Toward decimal

Octal "12"
= 1×8¹ + 2×8⁰
= 8 + 2
= 10  (decimal)

From decimal to output

Whole part — repeated division:
10 ÷ 16 = 0  R 10 (A)

Read remainders bottom → top → A

→ tool: 0xa

Verify: "12"0xa

Example 2

"377" (Octal) → Hexadecimal.

Toward decimal

Octal "377"
= 3×8² + 7×8¹ + 7×8⁰
= 192 + 56 + 7
= 255  (decimal)

From decimal to output

Whole part — repeated division:
255 ÷ 16 = 15  R 15 (F)
15 ÷ 16 = 0  R 15 (F)

Read remainders bottom → top → FF

→ tool: 0xff

Verify: "377"0xff

Example 3

"12.4" (Octal) → Hexadecimal.

Toward decimal

Octal "12.4"
Left of . : 1×8¹ + 2×8⁰ = 10
Right of .: 4×8^-1 = 0.5
= 10.5  (decimal)

From decimal to output

Whole part — repeated division:
10 ÷ 16 = 0  R 10 (A)

Read remainders bottom → top → A

Fractional part — multiply by 16, integer of each product = next digit after .
  0.5×16 = 8  →  8
Digits after . (in order): .8

→ tool: 0xa.8

Verify: "12.4"0xa.8

Summary

To convert Octal to Hexadecimal, the tool first parses your input strictly as octal, producing a decimal value. For binary, octal, decimal, and hex, you may include one radix point and fractional digits; character input remains a single code unit with no dot. That value is formatted as hexadecimal using the same rules as the main Number System Converter (prefixes 0b, 0, 0x where applicable; character output uses symbolic names for common controls and requires a whole-number code point). Long fractional expansions are truncated to a fixed digit cap; ordinary floating-point rounding may appear in extreme cases.

Relationship context

Octal, Hexadecimal, and the other numeric bases on this site all describe the same numeric value; only the radix changes (including optional fractional digits after one dot). Moving between them is equivalent to changing how the value is written, not to scaling or unit conversion. Binary, octal, and hex align with bit boundaries (powers of two), while decimal is optimized for human arithmetic.

Conversion tables

Octal (input)Hexadecimal (output)
00
010x1
020x2
030x3
040x4
050x5
060x6
070x7
0100x8
0110x9
0120xa
0170xf
0200x10
Octal (input)Hexadecimal (output)
0130xb
0400x20
01000x40
02000x80
04000x100
010000x200
020000x400
040000x800
0100000x1000
0200000x2000
0400000x4000
01000000x8000
01777770xffff

More number system pairs

Other fixed input/output converters use the same parsing rules as the hub. Open any pair for the same calculator layout and reference tables.