Free browser converter
Hex to Octal Converter
Convert hexadecimal integers to octal integers in your browser with explicit ASCII, Unicode code point, and UTF-8 byte handling.
Interactive tool
Convert hexadecimal integers to octal integers
Ready
Choose the exact representation you need; the tool does not guess an encoding.
Detailed conversion guide
How to Convert Hex to Octal
Hexadecimal groups values in four binary bits and octal groups them in three. Converting the exact integer regroups the same bits; hex 1ED becomes octal 755.
The converter uses BigInt for exact results beyond the safe integer limit. Plain output and an explicit 0o-prefixed form are both available.
| Input | Output | Meaning |
|---|---|---|
8 | 10 | base boundary |
F | 17 | single hex digit |
FF | 377 | one byte |
1ED | 755 | permission value |
Hex to Octal with BigInt
Validate 0-9 and A-F, normalize an optional 0x prefix, construct BigInt, and render with toString(8). Add 0o only as output syntax.
// validate first, then convert
const value = Number.parseInt(token, radix);
if (!Number.isInteger(value)) throw new Error("Invalid input");Exact Conversion and Unsupported Signed Values
This is a magnitude conversion. The tool does not infer two's-complement width, byte order, or a signed interpretation from the leading hex digit.
Digits outside 0-9 and A-F, signs, fractions, empty prefixes, and prose are rejected. Invalid input never yields a partial octal value.
Related converters
Continue converting ASCII and Unicode
Choose the converter for the direction and representation you need.