U.UtilityApp
🔄 ConvertersFree · No signup

Decimal to Octal Converter

Convert decimal numbers to octal (base-8).

Reading the result and the four-base panel

Type a whole number and the octal result appears in the main box. The panel below shows the same number in binary, octal, decimal and hexadecimal. The default 42 is octal 52, binary 101010 and hex 2A.

DecimalOctal
810
4252
64100
255377
511777
20263752

The pattern is easy to spot: 8 is 10, 64 is 100, and one less than a power of 8 is all sevens. The result is shown without a prefix. In Python and JavaScript you write octal literals with 0o in front, as in 0o52.

Checking a conversion by hand

Divide by 8 repeatedly and write down each remainder. Read the remainders from the last one to the first. For 2026:

Number÷ 8Remainder
20262532
253315
3137
303

Reading upwards gives 3752, which matches the tool. There is also a shortcut through binary: each octal digit stands for exactly three bits. Binary 101010 splits into 101 010, which is 5 and 2, so octal 52.

Inputs it reads differently than you might expect

The converter reads digits from the left and stops at the first character that isn't one. It doesn't reject the rest, so check the Decimal box in the panel: it shows the number that was actually read.

You typeRead asOctal
3.753 (the whole part only)3
1,0001 (stops at the comma)1
1 0001000 (spaces are removed)1750
12abc12 (stops at the first letter)14
1e31 (stops at the e)1
-42-42 (keeps the sign)-52

Very large numbers are a separate issue. Above 9,007,199,254,740,991 the value can't be stored exactly, so 9007199254740993 is read as 9007199254740992 and its octal is for that number.

File permissions, the place you'll meet octal most

Unix permission modes are octal: each digit packs the read (4), write (2) and execute (1) bits for owner, group and others. The mode 755 is decimal 493, and typing 493 here gives back 755. That is useful when a program or API reports a mode as a plain decimal number and you want to know what it means.

Frequently asked questions

Why are there no 8s or 9s in an octal number?+

Octal is base 8, so it only uses the digits 0 to 7. Counting past 7 carries into the next place, which is why decimal 8 is written as 10.

How do I convert a decimal fraction like 0.5 to octal?+

This converter only handles whole numbers and reads 0.5 as 0. Do the fraction by hand: multiply it by 8 and take the whole part as the next digit. 0.5 times 8 is 4, so 0.5 is 0.4 in octal.

Does a leading zero change the result?+

No. The input is always read as decimal, so 007 is just 7. Leading zeros are ignored rather than treated as an octal marker.

Embed this tool on your website

Free to use on blogs, school sites and intranets. Paste this code into your page's HTML; please keep the credit line.

<iframe src="https://utilityapp.lat/embed/convert/decimal-to-octal" title="Decimal to Octal Converter" width="100%" height="420" style="border:0;max-width:760px" loading="lazy"></iframe>
<p style="font-size:13px"><a href="https://utilityapp.lat/convert/decimal-to-octal">Decimal to Octal Converter</a> by UtilityApp</p>