Converter Tools

Octal to Text Converter

Translate octal back into characters. Paste three-digit octal bytes, backslash escapes from a script, or the output of an octal dump, and read the text.

  • Runs in your browser
  • No sign-up
  • Free to use

How to use Octal to Text

  1. Paste the octal values into the left box.
  2. Use spaces or commas between bytes, backslash escapes, or continuous groups of three digits.
  3. The decoded text appears on the right.
  4. Correct any item flagged as invalid, then copy the result.

Octal to Text features

Escape sequences

Decodes \110\145\154\154\157 as found in shell scripts and C strings.

Flexible separators

Spaces, commas, new lines or none.

UTF-8 decoding

Multi-byte sequences are combined into the right characters.

Validation

Digits 8 and 9 and values above 377 are reported clearly.

Instant result

Decodes while you type.

Private

Runs in your browser.

When to use Octal to Text

  • Reading octal escapes in obfuscated scripts and configuration files.
  • Decoding output from the od and printf commands.
  • Solving encoding puzzles and CTF challenges.
  • Checking exercises on number bases.
  • Interpreting file names that tools display with octal escapes.

Octal to Text FAQ

Why is 8 or 9 rejected?

Octal uses only the digits 0 to 7. An 8 or 9 means the input is not octal, perhaps decimal instead.

What is the largest valid value?

377, which equals 255, the largest byte.

Why do Git or ls show octal escapes in file names?

Tools escape bytes outside ASCII to keep output safe for terminals. A name containing é may appear as \303\251, the octal form of its UTF-8 bytes. Decoding reveals the real name.

Can I decode values without separators?

Yes, if every byte is written with exactly three digits, such as 110145154154157.

How do I encode text as octal?

Use the Text to Octal converter.

What does \033 or \x1b mean in scripts?

Both are the escape character, number 27: \033 writes it in octal and \x1b in hexadecimal. It begins the control sequences that colour and style terminal output. Decoding it here produces an invisible control character rather than visible text, which is expected.

How do I know whether a number is octal?

Octal uses only the digits 0 to 7, so any group containing an 8 or a 9 is not octal. In source code, octal numbers are often marked with a leading 0 or the prefix 0o, and in escape sequences with a backslash. A byte written in octal has at most three digits, with a maximum of 377, which equals 255.

Where octal text turns up

Octal-encoded text appears most often on Unix-like systems. The od command, short for octal dump, prints file contents as octal numbers by default, a habit from the earliest days of Unix. The printf and echo commands accept octal escapes, and scripts sometimes use them to embed special characters or to hide the meaning of a string.

Version control and file listing tools also produce octal. When Git shows a path like "caf\303\251.txt", it has escaped the two UTF-8 bytes of é. Decoding the escapes, as this tool does, restores the readable name café.txt.

Decoding works byte by byte: each three-digit group is converted to a value from 0 to 255, and the resulting bytes are interpreted as UTF-8 text. Values in the range 040 to 176 are printable ASCII; 012 is a line feed and 011 a tab.

Because octal digits stop at 7, the presence of an 8 or 9 is a reliable sign that a string of numbers is decimal character codes instead. In that case the ASCII to Text converter is the right tool.

Decoding by hand works the other way round: multiply each digit by a power of eight and add the results. For 101 that is 1 × 64 plus 0 × 8 plus 1 × 1, which makes 65, the code of the letter A. Doing one or two characters this way is a good check that a longer sequence was copied correctly and split at the right places.

Other useful tools