Octal Converter

// Octal - Convert between text and octal (base 8) representation

[UNIX]

Unix Systems

Commonly used for file permissions and escape sequences in Unix/Linux.

[COMPACT]

Space Efficient

More compact than binary, using only digits 0-7.

[ESCAPE]

Escape Sequences

Support for \nnn format used in many programming languages.

>> technical info

How Octal Works:

Octal (base 8) uses digits 0-7. Each octal digit represents exactly 3 bits. In computing, octal is often used for Unix file permissions (755 = rwxr-xr-x) and character escape sequences (\101 = 'A').

Examples:

'A' → 101 'Hello' → 110 145 154 154 157 chmod 755 → rwxr-xr-x

Why Use Octal:

  • >Unix file permissions
  • >Escape sequences
  • >Legacy systems
  • >Compact bit representation
  • >Character encoding

>> frequently asked questions

What is octal?

Octal is a base-8 number system using digits 0-7. Each octal digit represents exactly 3 bits, making it useful for representing binary data in a more compact form.

Why is octal used for Unix permissions?

Unix file permissions use 3 bits each for owner, group, and others (read=4, write=2, execute=1). Octal perfectly represents these 3-bit groups: 755 means rwx (7) for owner, r-x (5) for group and others.

What are octal escape sequences?

Octal escape sequences like \101 represent characters by their ASCII code in octal. They're used in many programming languages and tools to represent special or non-printable characters.

How does octal compare to hexadecimal?

Octal uses 8 symbols (0-7) and represents 3 bits per digit, while hexadecimal uses 16 symbols (0-F) and represents 4 bits per digit. Hex is more common today, but octal remains important for Unix systems.

Other Languages

Octal Converter — Base64.sh

Octal Converter | Octal to Text Encoder Decoder

Free online octal converter. Convert text to octal (base 8) and octal to text. Support for Unix file permissions, escape sequences, and formatting.

Share:

References

How we make sure

We check this tool with the automated test suites linked below. Example checks are shown in their original language.

Verification method
Compare the radix representation of each UTF-8 byte and decoded text, including non-ASCII input.
Comparison reference
Byte and radix strings produced by Node.js Buffer; Hex-to-text also checks malformed UTF-8.
Verification scope
These samples and boundaries do not prove correctness for every input.
Test source and cases (select a file to read it)

These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.