Skip to content
ZeroServer.tools

Octal to Binary Converter

Convert octal (base 8) numbers to binary (base 2).

Binary

Octal to binary, explained

Each octal digit maps to exactly three binary bits, so converting is a direct lookup — 7 111, 1 001. Enable padding to keep each digit's full three bits, or leave it off for the shortest representation. Everything is computed locally in your browser.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Expanding a file-permission value into the nine bits it actually sets.
  • Reading an octal field down to individual bits while debugging.
  • Checking which permission bits a chmod value turns on.
  • Converting an octal constant into a bit pattern for documentation.
  • Seeing why base eight is convenient when bits group in threes.

Frequently Asked Questions

How does the grouping work?
One octal digit is exactly three bits, because 8 is 2^3. 7 is 111, 5 is 101, so 75 octal is 111101. As with hex, conversion is pure substitution with no carrying.
Why three bits rather than four?
That is the difference between octal and hex, and the whole reason both exist. Three-bit grouping suited 12- and 36-bit word machines; four-bit grouping suits 8-bit bytes, which is why hex displaced octal as hardware standardised on bytes.
How does this relate to file permissions?
Directly — each octal digit in chmod IS a three-bit field, rwx. 7 is 111 (all three set), 5 is 101 (read and execute, no write). Seeing the binary is the clearest way to understand why 755 and 644 are the conventional values.
Does the bit count always divide evenly?
Only if the total is a multiple of three. A 8-bit byte needs three octal digits (up to 377 octal = 255), so the leading digit spans only two bits and can never exceed 3 — which is why octal byte values never start with 4-7.
Is octal used anywhere besides Unix?
Rarely now. It appears in some aviation transponder codes (squawk codes are octal), in older PDP assembly listings, and in string escapes like \101 for 'A'. Everything else has moved to hex.
How does this help when reading a umask?
Because each octal digit expands to exactly three bits, and those bits are the permissions being masked off. Converting 022 to 000 010 010 shows immediately that it clears group and other write and nothing else.
Why does the leading digit sometimes expand to fewer bits?
It does not — it expands to three like the rest, but the leading zeros are conventionally dropped in the output. Keeping them is what makes the digit boundaries line up when reading a permission value.

Common errors and gotchas

  • Dropping leading zeros within a group, since each octal digit is exactly three bits.
  • Losing the total width, so a permission value's bits misalign against the read-write-execute triples.
  • Overlooking a fourth digit for the special bits, which sits ahead of the usual nine.
  • Assuming the groups align with bytes. Three does not divide eight, so octal and byte boundaries differ.
  • Reading an 8 or a 9 as valid, which means the input was decimal all along.

Related Converters tools

Private & free — this tool runs entirely in your browser.

IndieKitShip your Next.js startup in days.affiliate