Octal converter

Convert text to octal (base-8) codes and octal back to readable text. Useful for programming, Unix permissions study and puzzles. Free converter.

Convert between text and octal numbers

Octal is the base-8 number system, using only the digits 0–7. Each octal digit stands for exactly three bits, which made it popular in early computing. The letter A (decimal 65) is 101 in octal, and "Hi" is 110 151.

Choose To octal to turn text into octal codes or To text to convert octal back to characters.

You'll still meet octal in Unix and Linux file permissions (like chmod 755), escape sequences in C, Python and shell scripts (such as \101), and computer science courses.

How to use the octal converter

  1. Paste text or octal codes.
  2. Choose To octal or To text.
  3. Submit to convert.
  4. Copy the result.

Examples

Text to octal

Input: Hi

Output: 110 151

H is 72 in decimal: 1×64 + 1×8 + 0 = 110 in octal.

A single letter

Input: A

Output: 101

Octal to text

Input: 110 151 41

Output: Hi!

41 in octal is 33 in decimal, the exclamation mark.

An accented letter

Input: é

Output: 303 251

Two UTF-8 bytes, two octal numbers.

Common uses

  • Decoding octal escape sequences in code and logs.
  • Number-system homework and exercises.
  • Puzzles and coded messages.
  • Understanding legacy systems that use octal.
  • Learning how number systems work alongside binary and hex.
  • Decoding octal escape sequences such as \110\151, which still appear in C strings, shell scripts and some log files.
  • Making simple coded messages for puzzles.

Tips and things to know

  • Separate each code with a space when converting to text.
  • In Unix permissions, each digit is a sum of read (4), write (2) and execute (1), so 7 = rwx and 5 = r-x.
  • Compare the same text in other bases with the binary, decimal and hex converters.

Edge cases and limitations

  • The digits 8 and 9 don't exist in octal and are ignored, so 189 is read as octal 1 and gives an invisible control character instead of an error.
  • Separate codes with single spaces. A double space or trailing space adds an invisible NUL character.
  • Unix permissions like 755 are three separate digits (owner, group, others), not a character code, so converting them to text gives nothing useful.
  • The output has a trailing space after the last code.
  • Octal numbers above 377 (255 in decimal) don't fit in one byte and give unexpected characters.

Frequently asked questions

What is octal used for today?

Mainly Unix file permissions and escape sequences in programming languages.

Why are there no 8s or 9s in octal?

Base 8 only uses digits 0 to 7; after 7 comes 10.

What is "A" in octal?

101.

Is octal the same as decimal?

No. Octal 10 equals decimal 8.

How do I read an octal escape like \303\251?

Enter the numbers without the backslashes, separated by spaces: 303 251. They decode to é, which is two bytes in UTF-8.

How do I convert octal to decimal by hand?

Multiply each digit by a power of 8, starting from the right: 151 is 1×64 + 5×8 + 1 = 105, the letter i.

Related tools

Similar tools

Binary converter

Convert text to binary code (Hi = 1001000 1101001) and binary back to text. Learn how computers store characters. Free online binary translator.

Hex converter

Convert text to hexadecimal (hex) code and hex back to readable text. Handy for debugging, encoding and learning. Free online text to hex converter.

Ascii converter

Convert text to ASCII character codes and ASCII codes back to text. Look up the number behind every letter and symbol. Free online ASCII converter.

Popular free tools