Home / Encoding tools / Octal converter

Octal Converter

Type a number in any base and see it in the others. Also convert text to octal codes and work out Unix file permissions.

Convert between bases

Text and octal codes

Unix permissions (chmod)

ReadWriteExecute Owner Group Others

What is octal?

Octal is the base 8 number system. It uses only the digits 0 to 7, and each place is worth a power of 8: ones, eights, sixty-fours and so on. Because 8 is 2 cubed, every octal digit stands for exactly three binary digits, which made octal a convenient shorthand for binary on early computers.

The four-way converter

Edit any of the four boxes, decimal, octal, binary or hexadecimal, and the other three update. Whole numbers of any size are supported, including negatives. Prefixes such as 0o, 0b and 0x are accepted, and spaces and underscores are ignored.

Text to octal

The text panel turns every byte of your text into an octal code. The letter A is 65 in decimal and 101 in octal. Edit the octal codes and the text updates too. Text is encoded as UTF-8, so characters outside basic ASCII use several codes.

Unix permissions

Octal is still used every day for file permissions. Each digit of a mode such as 755 is the sum of read (4), write (2) and execute (1). Tick the boxes to build a mode, or type one, and see the symbolic form and the chmod command. For example, 755 is rwxr-xr-x and 644 is rw-r--r--.

Specific conversions

For step-by-step working, use decimal to octal, octal to decimal or octal to binary. New to the idea? Read the guide to octal numbers.

Frequently asked questions

What is octal used for today?

Mainly Unix and Linux file permissions such as 755, and character escapes in some programming languages.

Why does octal only use digits 0 to 7?

Because it is base 8. Eight needs two digits to write, so it is 10 in octal.

Does it handle large numbers?

Yes. The converter uses arbitrary-size integers, so very long numbers convert exactly.

Can it convert fractions?

No. This tool converts whole numbers only.