Hexadecimal to Octal Converter
developer · number system
Convert Hexadecimal to Octal 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: Hexadecimal
To: Octal
Formulas
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.
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.
How to convert hexadecimal to octal
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 (Hexadecimal): Digits 0–9 plus letters A–F for values ten through fifteen.
Output (Octal): Each digit is 0–7 (eight possibilities per position).
Hex conversions use this letter-to-number map:
| Digit | Value | Digit | Value |
|---|---|---|---|
| 0 | 0 | 8 | 8 |
| 1 | 1 | 9 | 9 |
| 2 | 2 | A | 10 |
| 3 | 3 | B | 11 |
| 4 | 4 | C | 12 |
| 5 | 5 | D | 13 |
| 6 | 6 | E | 14 |
| 7 | 7 | F | 15 |
- 0x is a common prefix (e.g. 0xFF).
- A leading 0 is often used to mark octal (e.g. 012).
Step 2 — The Two-Step Method (via Decimal)
. 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 16 raised to the position index, then add every term. The total is your decimal number.
Digits after the dot: use negative powers of 16 (16−1, 16−2, …). Each place is still (digit × weight); add the fractional side to the whole side.
A–F reminder: treat A as 10, B as 11, …, F as 15 when you multiply by powers of 16 (see Step 1 table).
Part B — Out of decimal
Repeated division by 8: same idea as binary, but divide by 8 each time. Remainders are octal digits (0–7), read bottom-up.
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 Hexadecimal, converted to Octal 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
"1A" (Hexadecimal) → Octal.
Toward decimal
Hexadecimal "1A"
= 1×16¹ + A×16⁰
= 16 + 10
= 26 (decimal)From decimal to output
Whole part — repeated division:
26 ÷ 8 = 3 R 2
3 ÷ 8 = 0 R 3
Read remainders bottom → top → 32
→ tool: 032Verify: "1A" → 032
Example 2
"FF" (Hexadecimal) → Octal.
Toward decimal
Hexadecimal "FF"
= F×16¹ + F×16⁰
= 240 + 15
= 255 (decimal)From decimal to output
Whole part — repeated division:
255 ÷ 8 = 31 R 7
31 ÷ 8 = 3 R 7
3 ÷ 8 = 0 R 3
Read remainders bottom → top → 377
→ tool: 0377Verify: "FF" → 0377
Example 3
"A.8" (Hexadecimal) → Octal.
Toward decimal
Hexadecimal "A.8"
Left of . : A×16⁰ = 10
Right of .: 8×16^-1 = 0.5
= 10.5 (decimal)From decimal to output
Whole part — repeated division:
10 ÷ 8 = 1 R 2
1 ÷ 8 = 0 R 1
Read remainders bottom → top → 12
Fractional part — multiply by 8, integer of each product = next digit after .
0.5×8 = 4 → 4
Digits after . (in order): .4
→ tool: 012.4Verify: "A.8" → 012.4
Summary
To convert Hexadecimal to Octal, the tool first parses your input strictly as hexadecimal, 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 octal 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
Hexadecimal, Octal, 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
| Hexadecimal (input) | Octal (output) |
|---|---|
| 0 | 0 |
| 0x1 | 01 |
| 0x2 | 02 |
| 0x3 | 03 |
| 0x4 | 04 |
| 0x5 | 05 |
| 0x6 | 06 |
| 0x7 | 07 |
| 0x8 | 010 |
| 0x9 | 011 |
| 0xa | 012 |
| 0xf | 017 |
| 0x10 | 020 |
| Hexadecimal (input) | Octal (output) |
|---|---|
| 0xb | 013 |
| 0x20 | 040 |
| 0x40 | 0100 |
| 0x80 | 0200 |
| 0x100 | 0400 |
| 0x200 | 01000 |
| 0x400 | 02000 |
| 0x800 | 04000 |
| 0x1000 | 010000 |
| 0x2000 | 020000 |
| 0x4000 | 040000 |
| 0x8000 | 0100000 |
| 0xffff | 0177777 |
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.
- bin to char (Binary to Character)Fixed input/output · same parsing as hub
- bin to dec (Binary to Decimal)Fixed input/output · same parsing as hub
- bin to hex (Binary to Hexadecimal)Fixed input/output · same parsing as hub
- bin to oct (Binary to Octal)Fixed input/output · same parsing as hub
- char to bin (Character to Binary)Fixed input/output · same parsing as hub
- char to dec (Character to Decimal)Fixed input/output · same parsing as hub
- char to hex (Character to Hexadecimal)Fixed input/output · same parsing as hub
- char to oct (Character to Octal)Fixed input/output · same parsing as hub
- dec to bin (Decimal to Binary)Fixed input/output · same parsing as hub
- dec to char (Decimal to Character)Fixed input/output · same parsing as hub
- dec to hex (Decimal to Hexadecimal)Fixed input/output · same parsing as hub
- dec to oct (Decimal to Octal)Fixed input/output · same parsing as hub