Text to octal converter
Type or paste text to get the octal code of every character. Hello becomes 110 145 154 154 157. Each code has 3 digits, and you can choose the separator and encoding.
Show each character
Runs in your browser. Nothing you type is uploaded.
How to convert text to octal
- Find the code number of each character in the ASCII table. H is 72, e is 101. The text to ASCII converter lists these decimal codes for any text.
- Convert each code to base 8. 72 is 1 × 64 + 1 × 8 + 0, which is 110.
- Pad each result to 3 digits and put a space between them.
The tool does all three steps as you type. Open "Show each character" to see the decimal, hex and binary code next to every letter, or use the text to binary converter to get the binary for the whole string.

ASCII to octal chart
| Character | Decimal | Octal | Character | Decimal | Octal |
|---|---|---|---|---|---|
| Space | 32 | 040 | A | 65 | 101 |
| 0 | 48 | 060 | Z | 90 | 132 |
| 9 | 57 | 071 | a | 97 | 141 |
| ! | 33 | 041 | z | 122 | 172 |
| . | 46 | 056 | ~ | 126 | 176 |
Plain ASCII never goes above 177 in octal, which is 127 in decimal and 7F in the text to hex converter. Uppercase letters run from 101 to 132 and lowercase from 141 to 172.
Accents, emoji and encodings
Characters outside ASCII take more than one byte in UTF-8, and the tool writes one octal code per byte. So é becomes 303 251. If you need one code per letter for Western European text, pick ISO-8859-1 or Windows-1252 under Encoding and é becomes 351.
Octal escapes in code

Many languages read a backslash and up to 3 octal digits as a character, as in Python's escape sequence rules. In C, Python, JavaScript strings and Bash printf, \110\151 prints Hi. JavaScript treats octal escapes as a legacy form and rejects them in strict mode and template literals, so \x48\x69 is the safer way to write Hi there. To build that form, choose "None" as the separator and add a backslash before each code, or use the 0o prefix option for number literals.
Octal to text
To turn octal codes back into words, open ASCII to text and set "Codes are" to Octal. It reads codes such as 110 151 and shows Hi.
Frequently asked questions
How can I convert text to octal?
Look up the code of each character, write it in base 8 and pad it to 3 digits. The converter does this for every character as you type.
How do I convert ASCII codes to octal numbers?
Divide each code by 8 repeatedly and read the remainders backwards, or paste the codes into the decimal to octal converter.
What is A in octal?
101. A is code 65, and 65 = 1 × 64 + 0 × 8 + 1.
Why does each code have 3 digits?
One byte goes up to 255, which is 377 in octal. Three digits fit every byte, and padding keeps the codes easy to split.
Does my text leave the browser?
No. The conversion runs on your device and nothing is uploaded.

