1. Home
  2. Developer tools
  3. Octal to Binary

Octal to Binary

Each octal digit stands for exactly three bits, so converting is a lookup. Enter an octal number and see the triples that make up its binary form, for example 725 as 111 010 101.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Octal to Binary

  1. Enter octal numbers, one per line.
  2. Read the binary result and the digit-to-bits table.
  3. Group the bits for readability if you like.

Features

  • Digit-to-triple lookup shown with the result
  • Accepts a 0o prefix
  • Octal fractions convert exactly
  • Handles long numbers
  • Clear message if an 8 or 9 appears
  • Shows decimal and hex too

Supported formats

Input

  • Octal numbers
  • Typed or pasted numbers

You get

  • Binary
  • Digit table

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Octal to Binary is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Numbers are read in the base named by the tool, so a digit outside that base is reported instead of guessed.
  • Prefixes and separators (0x, 0b, 0o, spaces, underscores) are accepted, but letters and symbols outside the base are errors.

Guide

Octal to binary: what each digit means in bits

An octal digit is a shorthand for three on-off switches. Once you know that, any octal number can be opened up into its bits and read like a row of lights. This page expands octal numbers to binary and shows the lookup it used, which suits students checking an exercise as well as administrators decoding a permission mode.

The lookup

The digit 0 is 000 and the digit 1 is 001. Then 2 is 010, 3 is 011, 4 is 100, 5 is 101, 6 is 110 and 7 is 111. Because each pattern has a fixed length, converting means replacing digits one for one and joining the results, with no carrying or multiplying. That is also why the reverse conversion is just as simple, and why programmers have always liked power-of-two bases.

Reading permissions

Unix file modes are the most common place octal survives. The three digits stand for the owner, the group and everyone else. Within a digit, the bit worth 4 is read permission, the bit worth 2 is write and the bit worth 1 is execute. Expand 755 and you see 111 101 101: the owner may read, write and execute, while the group and the others may read and execute. Expand 644 and you see 110 100 100, where only the owner can write.

Input rules

Type or paste an octal number, with or without a 0o prefix. Spaces and underscores are ignored. A leading zero does not make a number octal on this page, because you have already chosen the base; in the C family of languages 010 is eight, which has been the cause of many bugs, and Python 3 insists on 0o10 for that reason. A digit 8 or 9 stops that line and the message names it. Several numbers can be pasted, one per line.

Edge cases

Zeros at the start of the result are dropped: octal 7 is binary 111, and octal 07 is also 111. Fractions are allowed and convert digit by digit after the point, so octal 0.4 is binary 0.100, which is 0.5 in decimal. Negative numbers keep the minus sign. Octal escapes in old C strings or tar headers can be pasted here to see the byte value in bits, though the page treats them as a number and not as a character code.

A worked example

The Sample button loads 755. The digit 7 becomes 111, the digit 5 becomes 101 and the last 5 becomes 101, so the binary number is 111101101 once joined. The extra box lists the same quantity as 493 in decimal and 1ED in hexadecimal. A check: 256 + 128 + 64 + 32 + 8 + 4 + 1 equals 493, which matches the decimal figure.

Limits

The page converts a number and does not interpret it. It does not translate bits into rwx letters, flag unusual combinations or add the special leading digit that setuid, setgid and sticky bits need. For permissions, the chmod calculator is better; for pure number work this page is enough. The lookup shown covers the digits that appear in your input, not necessarily all eight.

Checked against the current version of the Octal to Binary on .

Frequently asked questions

How do I tell what permissions the mode 640 gives?

Expand it to bits: 6 is 110, 4 is 100 and 0 is 000. Reading the bits as read, write and execute, the owner can read and write, the group can only read, and everyone else has no access.

Why is 9 not allowed in an octal number?

Octal has eight digits, 0 to 7, in the same way that decimal stops at 9. A 9 means the number was probably written in decimal. The page points to the character so you can decide which base was intended.

Why is 8 an error?

Octal only has the digits 0 to 7. A digit 8 or 9 means the number is probably decimal; the page names the character and its position.

Does a leading zero mean octal?

In C and older JavaScript it does, so 010 is 8. Here you choose the base yourself and a leading zero changes nothing.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.