Text to Octal Converter

Write text as octal (base-8) byte values and turn octal back into text. Octal still shows up in C string escapes, shell printf, PostgreSQL bytea escapes and older systems, and this converter gives you three-digit values ready to use. Every language works, because each character is first turned into its UTF-8 bytes.

Encoding
Direction

Hindi letters and ₹ take 3 bytes each.

Text
Octal

5 characters, 5 bytes in UTF-8.

Processing runs in your browser. What you type never leaves this device.

Features

  • Three-digit octal for each UTF-8 byte

  • Octal back to text, with or without separators

  • Space, comma, new-line or no separator

  • Code points instead of bytes if you need them

  • Runs in your browser

Where octal is still used

C and shell escapes

printf "\110\151" prints Hi. Add a backslash before each value from this tool.

PostgreSQL escape format

Older bytea output writes non-printable bytes as \ooo; decode them here.

Learning number bases

Compare the same text in [binary](/tools/text-to-binary), octal, [decimal](/tools/text-to-ascii) and [hex](/tools/text-to-hex).

Octal in brief

Why three digits

Octal uses the digits 0 to 7. One byte (0 to 255) needs up to three octal digits, 000 to 377, so the converter pads every byte to three digits. That is also why a run without separators can be split back into bytes.

File permissions are octal too

The 755 in chmod 755 is octal: each digit is three permission bits. It is a different use of the same number base.

Text to Octal Converter - FAQ