Boneyard Tools

Decimal to Octal Converter

Paste a decimal number to get its octal, base-8 value the moment you type. Spaces and commas are ignored, so grouped figures like 1,000 work, and arbitrary-precision maths means even huge numbers convert exactly with no rounding. Everything happens locally in your browser.

How to convert decimal to octal

  1. Type or paste your number into the Decimal input box, or press Load sample for 255.
  2. Use only non-negative whole numbers. Commas and spaces are allowed and get stripped.
  3. Watch the Octal output box update live as you type.
  4. Press Copy to put the octal value on your clipboard.

Examples

The largest single byte

255
377

A read-write-read-read file mode

420
644

An executable file mode

493
755

Frequently asked questions

What exactly is an octal number?

Octal is base 8, a number system that uses only the digits 0 through 7. Each position is worth eight times the one to its right, so octal 100 equals 64 in decimal. Everyday decimal is base 10 and uses digits 0 through 9.

Where is octal actually used?

The most common place is Unix and Linux file permissions, where modes like 755 and 644 are octal. Octal also appears in older computing systems, some hardware registers, and as a compact way to read binary three bits at a time.

How does converting decimal to octal work?

Repeatedly divide the decimal number by 8 and note each remainder. Reading the remainders from last to first gives the octal value. For example 64 divided by 8 is 8 remainder 0, then 8 divided by 8 is 1 remainder 0, so 64 becomes 100.

Why do 420 and 493 map to 644 and 755?

Those are the decimal forms of common file permission modes. 420 in octal is 644, which is read and write for the owner and read for others, while 493 is 755, adding execute rights. Chmod writes them in octal, but scripts sometimes store the decimal.

Is there a maximum size or number of digits?

No practical limit. The converter uses arbitrary-precision BigInt maths, so numbers with hundreds of digits convert to the exact octal value with no floating-point rounding error.

Can I include commas or spaces in the number?

Yes. Commas and spaces are stripped before converting, so grouped input like 1,000 or 4 096 gives the same result as the plain digits. Any other non-digit character is rejected as invalid.

Does it handle negative numbers or decimals?

No. Only non-negative whole numbers are supported. A minus sign, a decimal point or letters will show an Invalid number message, since octal here represents integers exactly rather than fractions.

What happens if I leave the box empty?

The output simply stays blank. Nothing is calculated until there is at least one digit to convert, and clearing the input clears the result too.

Is my data sent to a server?

No. The conversion runs entirely in your browser using local JavaScript, so the numbers you enter never leave your device or get logged.

Learn more

  • Octal and Unix file permissions

    Why chmod uses base-8 numbers, how each octal digit maps to read, write and execute bits, and how to read modes like 755 and 644 at a glance.

Related tools